From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Ryzhov Subject: [PATCH] pci: fix one device probing Date: Thu, 4 Aug 2016 14:50:06 +0300 Message-ID: <1470311406-38841-1-git-send-email-iryzhov@nfware.com> To: dev@dpdk.org Return-path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id 6186F1DB1 for ; Thu, 4 Aug 2016 13:50:14 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id l89so14651389lfi.2 for ; Thu, 04 Aug 2016 04:50:14 -0700 (PDT) Received: from localhost.localdomain (vpn.arccn.ru. [95.182.74.2]) by smtp.gmail.com with ESMTPSA id 21sm2388005ljf.7.2016.08.04.04.50.12 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 04 Aug 2016 04:50:12 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 7248c38..bfb6fd2 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -344,7 +344,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.6.4