aboutsummaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2015-06-29 13:58:17 -0400
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-09-10 12:04:30 +0000
commit52c7265f602701751b55d437b347bd73debf9d91 (patch)
treeeb92da2c646c176118befdc68a2043095081220c /hw/xen
parentcf8124f0078a7625fdf9836589210267817ae0ae (diff)
xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure
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>
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen_pt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index ba043e64af..3b1544c422 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;
}