aboutsummaryrefslogtreecommitdiff
path: root/hw/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/serial.c')
-rw-r--r--hw/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/serial.c b/hw/serial.c
index e044923101..eb14f11ba1 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -759,7 +759,7 @@ SerialState *serial_isa_init(int index, CharDriverState *chr)
qdev_prop_set_uint32(&dev->qdev, "iobase", isa_serial_io[index]);
qdev_prop_set_uint32(&dev->qdev, "irq", isa_serial_irq[index]);
qdev_prop_set_chr(&dev->qdev, "chardev", chr);
- if (qdev_init(&dev->qdev) != 0)
+ if (qdev_init(&dev->qdev) < 0)
return NULL;
return &DO_UPCAST(ISASerialState, dev, dev)->state;
}