From 25c62ca4eb0cb4bae0db9628ef343f246cc11820 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Thu, 4 Aug 2016 14:50:06 +0300 Subject: [PATCH] pci: fix probing error if no driver found The rte_eal_pci_probe_one function could return false positive result if no driver is found for the device. Signed-off-by: Igor Ryzhov Acked-by: David Marchand --- lib/librte_eal/common/eal_common_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 6163b09869..6bff6752f5 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -361,7 +361,7 @@ rte_eal_pci_probe_one(const struct rte_pci_addr *addr) continue; ret = pci_probe_all_drivers(dev); - if (ret < 0) + if (ret) goto err_return; return 0; } -- 2.20.1