提交 e25b89e5 编写于 作者: M Markus Armbruster 提交者: Andreas Färber

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: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 c4bacafb
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册