diff options
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/isa.c | 2 | ||||
-rw-r--r-- | hw/ide/qdev.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 3205f40b3b..9f0fdd6498 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -85,7 +85,7 @@ int isa_ide_init(int iobase, int iobase2, int isairq, qdev_prop_set_uint32(&dev->qdev, "iobase", iobase); qdev_prop_set_uint32(&dev->qdev, "iobase2", iobase2); qdev_prop_set_uint32(&dev->qdev, "irq", isairq); - if (qdev_init(&dev->qdev) != 0) + if (qdev_init(&dev->qdev) < 0) return -1; s = DO_UPCAST(ISAIDEState, dev, dev); diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index c562bc61a6..81e79950db 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -85,7 +85,7 @@ IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive) dev = qdev_create(&bus->qbus, "ide-drive"); qdev_prop_set_uint32(dev, "unit", unit); qdev_prop_set_drive(dev, "drive", drive); - if (qdev_init(dev) != 0) + if (qdev_init(dev) < 0) return NULL; return DO_UPCAST(IDEDevice, qdev, dev); } |