]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 29 Jun 2015 17:58:17 +0000 (13:58 -0400)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 2 Dec 2015 14:21:46 +0000 (14:21 +0000)
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 <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen/xen_pt.c

index 00b24aba7a359561b5eb1777f6a86f9b0c71ea27..c105deb784350326408d9892a547f7af1c309d46 100644 (file)
@@ -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;
     }