Commit 2b338f7c authored by Janice M. Girouard's avatar Janice M. Girouard Committed by Greg Kroah-Hartman

[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.
parent cf587ffc
......@@ -122,9 +122,7 @@ __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
if (!pci_dev->driver && drv->probe) {
error = pci_device_probe_static(drv, pci_dev);
if (error >= 0)
return error;
if (error == -ENODEV)
error = pci_device_probe_dynamic(drv, pci_dev);
}
return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment