Commit ae232f09 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Bjorn Helgaas

PCI: Drop pci_device_probe() test of !pci_dev->driver

When the device core calls the .probe() callback for a device, the device
is never bound, so pci_dev->driver is always NULL.

Remove the unnecessary test of !pci_dev->driver.

Link: https://lore.kernel.org/r/20211004125935.2300113-3-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent 097d9d41
......@@ -397,7 +397,7 @@ static int __pci_device_probe(struct pci_driver *drv, struct pci_dev *pci_dev)
const struct pci_device_id *id;
int error = 0;
if (!pci_dev->driver && drv->probe) {
if (drv->probe) {
error = -ENODEV;
id = pci_match_device(drv, pci_dev);
......
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