]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/core/hcd-pci.c
USB: fix crash during hotplug of PCI USB controller card
[karo-tx-linux.git] / drivers / usb / core / hcd-pci.c
index d59d99347d543b145e615c8854667f145bdd994f..1f02e65fe3056e609fc0b060f4878f4f5a372598 100644 (file)
@@ -75,7 +75,7 @@ static void for_each_companion(struct pci_dev *pdev, struct usb_hcd *hcd,
                                PCI_SLOT(companion->devfn) != slot)
                        continue;
                companion_hcd = pci_get_drvdata(companion);
-               if (!companion_hcd)
+               if (!companion_hcd || !companion_hcd->self.root_hub)
                        continue;
                fn(pdev, hcd, companion, companion_hcd);
        }