testing for probe errors in pci-driver.c
PATCH 1/1 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.
Janice
drivers/pci/pci-driver.c +2 -4
@@ -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; }