Spdk/test/common/config/pkgdep/patches/dpdk/20.11/dpdk_pci.patch
Michal Berger 5673325a6f autobuild: Move DPDK patches into the repo
Fetching these patches from external forks of DPDK repo is a bit
cumbersome and hard to maintain so instead have them in one place
for easy apply.

All of the patches were fetched "as-is" from the used forks, with
a commit section trimmed to provide just the relevant info.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6bf538ea15ef87fe04d5a77944de36c797cdf284
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10360
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-02 07:59:42 +00:00

21 lines
675 B
Diff

Subject: [PATCH] pci/linux: free the device if no kernel driver configured
---
drivers/bus/pci/linux/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 619d209ad21..06b523a15f2 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -330,8 +330,8 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
dev->kdrv = RTE_PCI_KDRV_UIO_GENERIC;
else
dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
- } else {
- dev->kdrv = RTE_PCI_KDRV_NONE;
+ } else { /* no kernel driver */
+ free(dev);
return 0;
}
/* device is valid, add in list (sorted) */