diff options
author | Amos Kong <kongjianjun@gmail.com> | 2012-05-22 23:58:40 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-13 18:38:06 -0400 |
commit | 638f293307b5787b69bf0a0bc915aed491efbec9 (patch) | |
tree | 9f55e09ea02362cfb336c39bd64b5fab9cb2f7f1 /drivers/pci/hotplug | |
parent | 06aef8cec7563c40c7d7501d13ec1ed12f5e495b (diff) |
PCI: acpiphp: fix function 0 leak when disabling a slot
Previously, we acquired two references to function 0, but only released
one.
[bhelgaas: split this out from "remove all functions" fix]
Signed-off-by: Amos Kong <kongjianjun@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 62d0ae4dfcad..c8f999102765 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -893,6 +893,7 @@ static int disable_device(struct acpiphp_slot *slot) | |||
893 | pdev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); | 893 | pdev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); |
894 | if (!pdev) | 894 | if (!pdev) |
895 | goto err_exit; | 895 | goto err_exit; |
896 | pci_dev_put(pdev); | ||
896 | 897 | ||
897 | list_for_each_entry(func, &slot->funcs, sibling) { | 898 | list_for_each_entry(func, &slot->funcs, sibling) { |
898 | if (func->bridge) { | 899 | if (func->bridge) { |