summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorAmos Kong <kongjianjun@gmail.com>2012-05-23 05:58:40 +0200
committerBjorn Helgaas <bhelgaas@google.com>2012-06-14 00:38:06 +0200
commit638f293307b5787b69bf0a0bc915aed491efbec9 (patch)
tree9f55e09ea02362cfb336c39bd64b5fab9cb2f7f1 /drivers/pci/hotplug
parentPCI: hotplug: remove pci_do_scan_bus() (diff)
downloadlinux-638f293307b5787b69bf0a0bc915aed491efbec9.tar.xz
linux-638f293307b5787b69bf0a0bc915aed491efbec9.zip
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.c1
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)
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) {