[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/26] pci: Set err to errp directly rather than thro
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 02/26] pci: Set err to errp directly rather than through error_propagate() |
Date: |
Sun, 15 Oct 2017 06:22:41 +0300 |
From: Mao Zhongyi <address@hidden>
ioh3420_interrupts_init() pass error message to local_err, then
propagate it to errp by error_propagate(), which is not necessary.
So eliminate it and pass errp directly instead of local_err.
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Signed-off-by: Mao Zhongyi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/pci-bridge/ioh3420.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index da4e5bd..5f56a2f 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -64,15 +64,13 @@ static uint8_t ioh3420_aer_vector(const PCIDevice *d)
static int ioh3420_interrupts_init(PCIDevice *d, Error **errp)
{
int rc;
- Error *local_err = NULL;
rc = msi_init(d, IOH_EP_MSI_OFFSET, IOH_EP_MSI_NR_VECTOR,
IOH_EP_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_64BIT,
IOH_EP_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_MASKBIT,
- &local_err);
+ errp);
if (rc < 0) {
assert(rc == -ENOTSUP);
- error_propagate(errp, local_err);
}
return rc;
--
MST
- [Qemu-devel] [PULL 00/26] pc, pci, virtio: fixes, features, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 01/26] xio3130_downstream: Report error if pcie_chassis_add_slot() failed, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 02/26] pci: Set err to errp directly rather than through error_propagate(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 03/26] fw_cfg: add write callback, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 04/26] hw/misc: add vmcoreinfo device, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 05/26] dump: add guest ELF note, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 06/26] dump: update phys_base header field based on VMCOREINFO content, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 07/26] kdump: set vmcoreinfo location, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 08/26] scripts/dump-guest-memory.py: add vmcoreinfo, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 09/26] MAINTAINERS: add Dump maintainers, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 10/26] virtio/vhost: reset dev->log after syncing, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 11/26] pci: allow 32-bit PCI IO accesses to pass through the PCI bridge, Michael S. Tsirkin, 2017/10/14
- [Qemu-devel] [PULL 12/26] hw/pci-bridge/pcie_pci_bridge: properly handle MSI unavailability case, Michael S. Tsirkin, 2017/10/14