From: Andrew Morton Signed-off-by: Andrew Morton --- drivers/pci/msi.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN drivers/pci/msi-altix.c~msi-oops-workaround drivers/pci/msi-altix.c diff -puN drivers/pci/msi.c~msi-oops-workaround drivers/pci/msi.c --- a/drivers/pci/msi.c~msi-oops-workaround +++ a/drivers/pci/msi.c @@ -815,6 +815,9 @@ int pci_msi_supported(struct pci_dev * d while (pdev->bus && pdev->bus->self) pdev = pdev->bus->self; + if (!pdev->subordinate) + return -1; + /* check its bus flags */ if (pdev->subordinate->bus_flags & PCI_BUS_FLAGS_NO_MSI) return -1; _