[dpdk-dev,RFC,11/23] eal: Do not panic on pci-probe

Message ID 1483111580-5397-12-git-send-email-aconole@redhat.com (mailing list archive)
State RFC, archived
Headers

Checks

Context Check Description
ci/Intel compilation fail Compilation issues

Commit Message

Aaron Conole Dec. 30, 2016, 3:26 p.m. UTC
  Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/linuxapp/eal/eal.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index a23ba17..018d359 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -819,8 +819,11 @@  rte_eal_init(int argc, char **argv)
 		return -1;
 	}
 
-	if (rte_eal_pci_init() < 0)
-		rte_panic("Cannot init PCI\n");
+	if (rte_eal_pci_init() < 0) {
+		RTE_LOG (ERR, EAL, "Cannot init PCI\n");
+		errno = EPERM;
+		return -1;
+	}
 
 #ifdef VFIO_PRESENT
 	if (rte_eal_vfio_setup() < 0)