Skip to content

Commit 2c5bfce

Browse files
committed
Merge branch 'acpi-pci-hotplug'
* acpi-pci-hotplug: ACPI / hotplug / PCI: Drop WARN_ON() from acpiphp_enumerate_slots() ACPI / hotplug / PCI: Fix error code path in acpiphp_enumerate_slots()
2 parents aaf3d29 + fd3cfeb commit 2c5bfce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/pci/hotplug/acpiphp_glue.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,14 +994,16 @@ void acpiphp_enumerate_slots(struct pci_bus *bus)
994994

995995
/*
996996
* This bridge should have been registered as a hotplug function
997-
* under its parent, so the context has to be there. If not, we
998-
* are in deep goo.
997+
* under its parent, so the context should be there, unless the
998+
* parent is going to be handled by pciehp, in which case this
999+
* bridge is not interesting to us either.
9991000
*/
10001001
mutex_lock(&acpiphp_context_lock);
10011002
context = acpiphp_get_context(handle);
1002-
if (WARN_ON(!context)) {
1003+
if (!context) {
10031004
mutex_unlock(&acpiphp_context_lock);
10041005
put_device(&bus->dev);
1006+
pci_dev_put(bridge->pci_dev);
10051007
kfree(bridge);
10061008
return;
10071009
}

0 commit comments

Comments
 (0)