From: "Shreya Shrivastava" <pink89@sigaint.org>
To: qemu-devel@nongnu.org
Cc: stefanha@gmail.com
Subject: [Qemu-devel] [PATCH 4/4] Added error checking for msix_init.
Date: Sun, 16 Oct 2016 00:53:16 -0000 [thread overview]
Message-ID: <08db498b4f8971c9e22f350dbd8ddbde.webmail@localhost> (raw)
Add checks for negative return value to uses of msix_init.
Signed-off-by: Shreya Shrivastava <pink89@sigaint.org>
---
hw/usb/hcd-xhci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4acf0c6..cb854aa 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3705,10 +3705,11 @@ static void usb_xhci_realize(struct PCIDevice
*dev, Error **errp)
if (xhci->msix != ON_OFF_AUTO_OFF) {
/* TODO check for errors */
- msix_init(dev, xhci->numintrs,
+ ret = msix_init(dev, xhci->numintrs,
&xhci->mem, 0, OFF_MSIX_TABLE,
&xhci->mem, 0, OFF_MSIX_PBA,
0x90);
+ assert(ret >= 0);
}
}
--
1.9.1
next reply other threads:[~2016-10-16 0:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-16 0:53 Shreya Shrivastava [this message]
2016-10-16 17:06 ` [Qemu-devel] [PATCH 4/4] Added error checking for msix_init Stefan Hajnoczi
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=08db498b4f8971c9e22f350dbd8ddbde.webmail@localhost \
--to=pink89@sigaint.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).