From: David Marchand Date: Tue, 15 Mar 2016 06:29:11 +0000 (+0100) Subject: pci: align ioport unmap error handling to ioport map X-Git-Tag: spdx-start~7259 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fd5bc8ff7091053c05d7c2d07646964c09b85b3b;p=dpdk.git pci: align ioport unmap error handling to ioport map Same idea as commit bd80d4730aca ("pci: rework ioport map error handling"). Signed-off-by: David Marchand --- diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 9f752529b9..77d70d9eb7 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -684,12 +684,11 @@ rte_eal_pci_ioport_write(struct rte_pci_ioport *p, int rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) { - int ret; + int ret = -1; switch (p->dev->kdrv) { #ifdef VFIO_PRESENT case RTE_KDRV_VFIO: - ret = -1; if (pci_vfio_is_enabled()) ret = pci_vfio_ioport_unmap(p); break; @@ -702,8 +701,6 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) #if defined(RTE_ARCH_X86) /* special case for x86 ... nothing to do */ ret = 0; -#else - ret = -1; #endif break; }