From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMs9-000076-J5 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 13:39:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZMs8-0006EO-O4 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 13:39:57 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:47365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMs8-0006Dt-KH for qemu-devel@nongnu.org; Tue, 08 Sep 2015 13:39:56 -0400 From: Stefano Stabellini Date: Tue, 8 Sep 2015 18:21:17 +0100 Message-ID: <1441732880-19888-16-git-send-email-stefano.stabellini@eu.citrix.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PULL 16/19] 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: peter.maydell@linaro.org Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org, Konrad Rzeszutek Wilk , Stefano Stabellini From: 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 Signed-off-by: Stefano Stabellini --- 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 ba043e6..3b1544c 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -729,7 +729,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; } -- 1.7.10.4