diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 7904d02ffdb97e5f23d915e9c83edbf599ddf58b..8ab0a0d3cddb209adff1c6ec4e899efc12f1244c 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4932,6 +4932,8 @@ bool pci_device_is_present(struct pci_dev *pdev) { u32 v; + if (pci_dev_is_disconnected(pdev)) + return false; return pci_bus_read_dev_vendor_id(pdev->bus, pdev->devfn, &v, 0); } EXPORT_SYMBOL_GPL(pci_device_is_present);