pci: align ioport unmap error handling to ioport map

Same idea as commit bd80d4730a ("pci: rework ioport map error handling").

Signed-off-by: David Marchand <david.marchand@6wind.com>
This commit is contained in:
David Marchand 2016-03-15 07:29:11 +01:00 committed by Thomas Monjalon
parent 2186fff367
commit fd5bc8ff70

View File

@ -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;
}