diff options
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 5246ba297470..e98018b43e2a 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -990,14 +990,16 @@ void acpiphp_enumerate_slots(struct pci_bus *bus) | |||
990 | 990 | ||
991 | /* | 991 | /* |
992 | * This bridge should have been registered as a hotplug function | 992 | * This bridge should have been registered as a hotplug function |
993 | * under its parent, so the context has to be there. If not, we | 993 | * under its parent, so the context should be there, unless the |
994 | * are in deep goo. | 994 | * parent is going to be handled by pciehp, in which case this |
995 | * bridge is not interesting to us either. | ||
995 | */ | 996 | */ |
996 | mutex_lock(&acpiphp_context_lock); | 997 | mutex_lock(&acpiphp_context_lock); |
997 | context = acpiphp_get_context(handle); | 998 | context = acpiphp_get_context(handle); |
998 | if (WARN_ON(!context)) { | 999 | if (!context) { |
999 | mutex_unlock(&acpiphp_context_lock); | 1000 | mutex_unlock(&acpiphp_context_lock); |
1000 | put_device(&bus->dev); | 1001 | put_device(&bus->dev); |
1002 | pci_dev_put(bridge->pci_dev); | ||
1001 | kfree(bridge); | 1003 | kfree(bridge); |
1002 | return; | 1004 | return; |
1003 | } | 1005 | } |