[PATCH] bus/pci: print the return value when probe failed
Xingui Yang
yangxingui at huawei.com
Thu Aug 28 05:00:27 CEST 2025
The return value is not printed when probe failed, and it is not
convenient for locating the problem, so add it.
Signed-off-by: Xingui Yang <yangxingui at huawei.com>
---
drivers/bus/pci/pci_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index c88634f790..adef4c16e1 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -410,9 +410,9 @@ pci_probe(void)
ret = pci_probe_all_drivers(dev);
if (ret < 0) {
if (ret != -EEXIST) {
- PCI_LOG(ERR, "Requested device " PCI_PRI_FMT " cannot be used",
- dev->addr.domain, dev->addr.bus,
- dev->addr.devid, dev->addr.function);
+ PCI_LOG(ERR, "Requested device " PCI_PRI_FMT " cannot be used, ret = %d",
+ dev->addr.domain, dev->addr.bus, dev->addr.devid,
+ dev->addr.function, ret);
rte_errno = errno;
failed++;
}
--
2.33.0
More information about the dev
mailing list