ChangeSet 1.1123.21.2, 2003/08/13 17:42:56-07:00, janiceg@us.ibm.com [PATCH] PCI: testing for probe errors in pci-driver.c Currently if __pci_device_probe locates the correct device driver, but receives an error from the static drv->probe function, this error is not reported. The attached patch reports the above error condition to the caller. Only when a match for the device in the static tables is not found, is the dynamic driver table searched. drivers/pci/pci-driver.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -Nru a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c --- a/drivers/pci/pci-driver.c Thu Aug 21 10:22:52 2003 +++ b/drivers/pci/pci-driver.c Thu Aug 21 10:22:52 2003 @@ -122,10 +122,8 @@ if (!pci_dev->driver && drv->probe) { error = pci_device_probe_static(drv, pci_dev); - if (error >= 0) - return error; - - error = pci_device_probe_dynamic(drv, pci_dev); + if (error == -ENODEV) + error = pci_device_probe_dynamic(drv, pci_dev); } return error; }