diff options
author | Amos Kong <kongjianjun@gmail.com> | 2012-05-22 21:58:40 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-06-13 16:38:06 -0600 |
commit | 638f293307b5787b69bf0a0bc915aed491efbec9 (patch) | |
tree | 9f55e09ea02362cfb336c39bd64b5fab9cb2f7f1 /drivers/pci | |
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')
-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 62d0ae4dfca..c8f99910276 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) pdev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); if (!pdev) goto err_exit; + pci_dev_put(pdev); list_for_each_entry(func, &slot->funcs, sibling) { if (func->bridge) { |