From e25b89e5208564220b9ea3a728f899b37ff6dc2d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 4 Feb 2015 18:33:02 +0100 Subject: ide/isa: Replace unchecked qdev_init() by qdev_init_nofail() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Stefan Hajnoczi Signed-off-by: Markus Armbruster Signed-off-by: Andreas Färber --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/ide/isa.c') 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) { -- cgit v1.2.3