From: Gaetan Rivet Date: Sat, 15 Jul 2017 17:56:40 +0000 (+0200) Subject: bus/pci: fix generic driver pointer on probe error X-Git-Tag: spdx-start~2464 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=be860f4e4dc4dfc8b3f473f0e5640bbd4d2d783e;p=dpdk.git bus/pci: fix generic driver pointer on probe error The field is set but never resetted on error. This marks the device as being attached while it is not, and forbid further attempts to hotplug it. Fixes: 7917d5f5ea46 ("pci: initialize generic driver pointer") Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet --- diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 45e697eb1c..0a4062cd90 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -245,6 +245,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, ret = dr->probe(dr, dev); if (ret) { dev->driver = NULL; + dev->device.driver = NULL; if ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) && /* Don't unmap if device is unsupported and * driver needs mapped resources.