Received: from eggs.gnu.org ([2001:4830:134:3::10]:37959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAkCt-0002g0-Fj for qemu-devel@nongnu.org; Thu, 02 Jul 2015 15:31:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAkCp-0005ve-Lc for qemu-devel@nongnu.org; Thu, 02 Jul 2015 15:31:35 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:19222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAkCp-0005v5-E9 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 15:31:31 -0400 From: Konrad Rzeszutek Wilk Date: Thu, 2 Jul 2015 15:31:16 -0400 Message-Id: <1435865479-18329-4-git-send-email-konrad.wilk@oracle.com> In-Reply-To: <1435865479-18329-1-git-send-email-konrad.wilk@oracle.com> References: <1435865479-18329-1-git-send-email-konrad.wilk@oracle.com> Subject: [Qemu-devel] [PATCH v1 3/6] xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com, xen-devel@lists.xenproject.org, qemu-devel@nongnu.org Cc: Konrad Rzeszutek Wilk However the init routines assume that on errors the return code is -1 (as the libxc API is) - while those xen_host_* routines follow another paradigm - negative errno on return, 0 on success. Reviewed-by: Stefano Stabellini Signed-off-by: Konrad Rzeszutek Wilk --- hw/xen/xen_pt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 706e3d9..ea1ceda 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -716,7 +716,7 @@ static int xen_pt_initfn(PCIDevice *d) /* Initialize virtualized PCI configuration (Extended 256 Bytes) */ if (xen_host_pci_get_block(&s->real_device, 0, d->config, - PCI_CONFIG_SPACE_SIZE) == -1) { + PCI_CONFIG_SPACE_SIZE) < 0) { xen_host_pci_device_put(&s->real_device); return -1; } -- 2.1.0