summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r--hw/ide/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index c562bc61a..81e79950d 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);
}