[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] Added error checking for msix_init.
From: |
Shreya Shrivastava |
Subject: |
[Qemu-devel] [PATCH 4/4] Added error checking for msix_init. |
Date: |
Sun, 16 Oct 2016 00:53:16 -0000 |
Add checks for negative return value to uses of msix_init.
Signed-off-by: Shreya Shrivastava <address@hidden>
---
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
- [Qemu-devel] [PATCH 4/4] Added error checking for msix_init.,
Shreya Shrivastava <=