| Submitter | Greg Kroah-Hartman |
|---|---|
| Date | 2009-11-06 22:15:08 |
| Message ID | <20091106221548.424594928@mini.kroah.org> |
| Download | mbox | patch |
| Permalink | /patch/58182/ |
| State | New |
| Headers | show |
Comments
Patch
--- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -400,6 +400,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_ha pbus = pdev->subordinate; 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: list_for_each_entry_safe(node, tmp, &device_list, node)