Commit f63a9048 authored by Len Brown's avatar Len Brown

Merge branch 'bugzilla-14129' into release

parents a3ccf63e 497fb54f
...@@ -389,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle) ...@@ -389,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
pbus = pdev->subordinate; pbus = pdev->subordinate;
pci_dev_put(pdev); pci_dev_put(pdev);
/*
* This function may be called for a non-PCI device that has a
* PCI parent (eg. a disk under a PCI SATA controller). In that
* case pdev->subordinate will be NULL for the parent.
*/
if (!pbus) {
dev_dbg(&pdev->dev, "Not a PCI-to-PCI bridge\n");
pdev = NULL;
break;
}
} }
out: out:
list_for_each_entry_safe(node, tmp, &device_list, node) list_for_each_entry_safe(node, tmp, &device_list, node)
......
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