diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-06 20:33:06 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-11-06 20:33:06 +0100 |
commit | ed78bb846e8bc1a8589fa6e0d9bf2b0f518893d5 (patch) | |
tree | 161589a3c61ef29d0b16bd57222381ae0419569a /include | |
parent | Merge tag 'sound-3.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/t... (diff) | |
parent | PCI: Don't oops on virtual buses in acpi_pci_get_bridge_handle() (diff) | |
download | linux-ed78bb846e8bc1a8589fa6e0d9bf2b0f518893d5.tar.xz linux-ed78bb846e8bc1a8589fa6e0d9bf2b0f518893d5.zip |
Merge tag 'pci-v3.18-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI fix from Bjorn Helgaas:
"This fixes an oops when enabling SR-IOV VF devices. The oops is a
regression I added by configuring all devices during enumeration.
- Don't oops on virtual buses in acpi_pci_get_bridge_handle() (Yinghai Lu)"
* tag 'pci-v3.18-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: Don't oops on virtual buses in acpi_pci_get_bridge_handle()
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci-acpi.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 64dacb7288a6..24c7728ca681 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h @@ -41,8 +41,13 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) if (pci_is_root_bus(pbus)) dev = pbus->bridge; - else + else { + /* If pbus is a virtual bus, there is no bridge to it */ + if (!pbus->self) + return NULL; + dev = &pbus->self->dev; + } return ACPI_HANDLE(dev); } |