From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
afaerber@suse.de, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 2/8] ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()
Date: Wed, 4 Feb 2015 18:33:02 +0100 [thread overview]
Message-ID: <1423071188-1085-3-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1423071188-1085-1-git-send-email-armbru@redhat.com>
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>
---
hw/ide/isa.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/ide/isa.c b/hw/ide/isa.c
index b084162..c0c4e1b 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) {
--
1.9.3
next prev parent reply other threads:[~2015-02-04 17:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-04 17:33 [Qemu-devel] [PATCH 0/8] Cleanups around unchecked qdev_init() Markus Armbruster
2015-02-04 17:33 ` [Qemu-devel] [PATCH 1/8] qdev: Improve qdev_init_nofail()'s error reporting Markus Armbruster
2015-02-04 17:33 ` Markus Armbruster [this message]
2015-02-04 17:33 ` [Qemu-devel] [PATCH 3/8] leon3: Replace unchecked qdev_init() by qdev_init_nofail() Markus Armbruster
2015-02-12 9:30 ` Fabien Chouteau
2015-02-04 17:33 ` [Qemu-devel] [PATCH 4/8] etsec: Replace " Markus Armbruster
2015-02-04 17:33 ` [Qemu-devel] [PATCH 5/8] serial: Factor out common serial_hds_isa_init() Markus Armbruster
2015-02-04 17:33 ` [Qemu-devel] [PATCH 6/8] serial: serial_hds_isa_init() shouldn't fail Markus Armbruster
2015-02-04 17:33 ` [Qemu-devel] [PATCH 7/8] parallel: Factor out common parallel_hds_isa_init() Markus Armbruster
2015-02-04 17:33 ` [Qemu-devel] [PATCH 8/8] parallel: parallel_hds_isa_init() shouldn't fail Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423071188-1085-3-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).