Commit ed78bb846e8bc1a8589fa6e0d9bf2b0f518893d5

Authored by Linus Torvalds

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()

Showing 1 changed file Side-by-side Diff

include/linux/pci-acpi.h
... ... @@ -41,8 +41,13 @@
41 41  
42 42 if (pci_is_root_bus(pbus))
43 43 dev = pbus->bridge;
44   - else
  44 + else {
  45 + /* If pbus is a virtual bus, there is no bridge to it */
  46 + if (!pbus->self)
  47 + return NULL;
  48 +
45 49 dev = &pbus->self->dev;
  50 + }
46 51  
47 52 return ACPI_HANDLE(dev);
48 53 }