pci: fix probing error if no driver found
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 4 Aug 2016 11:50:06 +0000 (14:50 +0300)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 7 Nov 2016 13:50:47 +0000 (14:50 +0100)
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 <iryzhov@nfware.com>
Acked-by: David Marchand <david.marchand@6wind.com>
lib/librte_eal/common/eal_common_pci.c

index 6163b09..6bff675 100644 (file)
@@ -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;
        }