From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvZhg-000361-KW for qemu-devel@nongnu.org; Sat, 15 Oct 2016 20:53:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvZhd-0005oH-Bl for qemu-devel@nongnu.org; Sat, 15 Oct 2016 20:53:28 -0400 Received: from mx2.sigaint.org ([87.121.52.221]:54280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvZhb-0005lk-Uh for qemu-devel@nongnu.org; Sat, 15 Oct 2016 20:53:25 -0400 Message-ID: <08db498b4f8971c9e22f350dbd8ddbde.webmail@localhost> Date: Sun, 16 Oct 2016 00:53:16 -0000 From: "Shreya Shrivastava" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 4/4] Added error checking for msix_init. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@gmail.com Add checks for negative return value to uses of msix_init. Signed-off-by: Shreya Shrivastava --- 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