[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 3/6] xen/pt: xen_host_pci_config_read returns -er
From: |
Konrad Rzeszutek Wilk |
Subject: |
[Qemu-devel] [PATCH v2 3/6] xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure |
Date: |
Tue, 8 Sep 2015 09:55:30 -0400 |
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 <address@hidden>
Signed-off-by: Konrad Rzeszutek Wilk <address@hidden>
---
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
- [Qemu-devel] [PATCH v2] Cleanups + various fixes due to libxl ABI + more logging on errors., Konrad Rzeszutek Wilk, 2015/09/08
- [Qemu-devel] [PATCH v2 6/6] xen/pt: Use XEN_PT_LOG properly to guard against compiler warnings., Konrad Rzeszutek Wilk, 2015/09/08
- Re: [Qemu-devel] [PATCH v2] Cleanups + various fixes due to libxl ABI + more logging on errors., Stefano Stabellini, 2015/09/08
- [Qemu-devel] [PATCH v2 3/6] xen/pt: xen_host_pci_config_read returns -errno, not -1 on failure,
Konrad Rzeszutek Wilk <=
- [Qemu-devel] [PATCH v2 1/6] xen/pt: Update comments with proper function name., Konrad Rzeszutek Wilk, 2015/09/08
- [Qemu-devel] [PATCH v2 5/6] xen/pt/msi: Add the register value when printing logging and error messages, Konrad Rzeszutek Wilk, 2015/09/08
- [Qemu-devel] [PATCH v2 2/6] xen/pt: Make xen_pt_msi_set_enable static, Konrad Rzeszutek Wilk, 2015/09/08
- [Qemu-devel] [PATCH v2 4/6] xen: use errno instead of rc for xc_domain_add_to_physmap, Konrad Rzeszutek Wilk, 2015/09/08