summaryrefslogtreecommitdiff
path: root/hw/isa-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/isa-bus.c')
-rw-r--r--hw/isa-bus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index 85ba35494..2843b5132 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -137,10 +137,12 @@ ISADevice *isa_create_simple(const char *name, uint32_t iobase, uint32_t iobase2
isa->iobase[0] = iobase;
isa->iobase[1] = iobase2;
qdev_init(dev);
- if (-1 != irq)
+ if (irq != -1) {
isa_connect_irq(isa, 0, irq);
- if (-1 != irq2)
+ }
+ if (irq2 != -1) {
isa_connect_irq(isa, 1, irq2);
+ }
return isa;
}