summaryrefslogtreecommitdiffstats
path: root/hw/ide/isa.c
diff options
context:
space:
mode:
authorMarkus Armbruster2015-02-04 18:33:02 +0100
committerAndreas Färber2015-02-24 00:19:05 +0100
commite25b89e5208564220b9ea3a728f899b37ff6dc2d (patch)
tree84b962357dcd2d18c54b73c6f612bc1bbd38edb8 /hw/ide/isa.c
parentqdev: Improve qdev_init_nofail()'s error reporting (diff)
downloadqemu-e25b89e5208564220b9ea3a728f899b37ff6dc2d.tar.gz
qemu-e25b89e5208564220b9ea3a728f899b37ff6dc2d.tar.xz
qemu-e25b89e5208564220b9ea3a728f899b37ff6dc2d.zip
ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()
isa_ide_init()'s callers don't check for failure. isa_ide_init() looks like it could fail, but since isa_ide_realizefn() can't fail, it actually can't. Replace its qdev_init() by qdev_init_nofail() to make it obvious. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/ide/isa.c')
-rw-r--r--hw/ide/isa.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index b084162ddc..c0c4e1b098 100644
--- a/hw/ide/isa.c
+++ b/hw/ide/isa.c
@@ -88,9 +88,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
qdev_prop_set_uint32(dev, "iobase", iobase);
qdev_prop_set_uint32(dev, "iobase2", iobase2);
qdev_prop_set_uint32(dev, "irq", isairq);
- if (qdev_init(dev) < 0) {
- return NULL;
- }
+ qdev_init_nofail(dev);
s = ISA_IDE(dev);
if (hd0) {