Merge branch 'acpi-pci-hotplug'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 12 Oct 2013 13:19:52 +0000 (15:19 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 12 Oct 2013 13:19:52 +0000 (15:19 +0200)
* acpi-pci-hotplug:
  ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots()
  ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()

drivers/pci/hotplug/acpiphp_glue.c

index 0b7d23b4ad954489b657480d0ee08a3b7b2d81d8..be12fbfcae1042e90c00d192bffe46c47821b6c4 100644 (file)
@@ -994,14 +994,16 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
 
                /*
                 * This bridge should have been registered as a hotplug function
-                * under its parent, so the context has to be there.  If not, we
-                * are in deep goo.
+                * under its parent, so the context should be there, unless the
+                * parent is going to be handled by pciehp, in which case this
+                * bridge is not interesting to us either.
                 */
                mutex_lock(&acpiphp_context_lock);
                context = acpiphp_get_context(handle);
-               if (WARN_ON(!context)) {
+               if (!context) {
                        mutex_unlock(&acpiphp_context_lock);
                        put_device(&bus->dev);
+                       pci_dev_put(bridge->pci_dev);
                        kfree(bridge);
                        return;
                }
This page took 0.026548 seconds and 5 git commands to generate.