aboutsummaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-10-07 01:16:01 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-07 08:54:55 -0500
commit5c17ca2505197c56d0097c66a4e5bda4d6f32fb6 (patch)
tree011adae1a2f9ce724c92629bd99b78507a7d97ec /hw/fdc.c
parentdde8bbb44de41ea68f9bede0a6a778ce046b2bcf (diff)
Clean up test for qdev_init() failure
Some callers test for != 0, some for < 0. Normalize to < 0. Patchworks-ID: 35171 Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index f1b2f9a93e..a21e05f0eb 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -1847,7 +1847,7 @@ fdctrl_t *fdctrl_init_isa(DriveInfo **fds)
dev = isa_create("isa-fdc");
qdev_prop_set_drive(&dev->qdev, "driveA", fds[0]);
qdev_prop_set_drive(&dev->qdev, "driveB", fds[1]);
- if (qdev_init(&dev->qdev) != 0)
+ if (qdev_init(&dev->qdev) < 0)
return NULL;
return &(DO_UPCAST(fdctrl_isabus_t, busdev, dev)->state);
}