summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-12 15:19:52 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-12 15:19:52 +0200
commit2c5bfce855ead529e2ea6f33757aa26a651d4460 (patch)
tree2e98e703705510801c055730a45df691b494d138
parentaaf3d29fe8c888f3fc1b5e00d66085fe4e06e4cb (diff)
parentfd3cfebec3199bb89acead236b1ab12c349ed4e0 (diff)
Merge branch 'acpi-pci-hotplug'pm+acpi-3.12-rc5
* acpi-pci-hotplug: ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots() ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 0b7d23b4ad95..be12fbfcae10 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -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;
}