summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorAmos Kong <kongjianjun@gmail.com>2012-05-22 21:58:40 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 16:38:06 -0600
commit638f293307b5787b69bf0a0bc915aed491efbec9 (patch)
tree9f55e09ea02362cfb336c39bd64b5fab9cb2f7f1 /drivers/pci/hotplug
parent06aef8cec7563c40c7d7501d13ec1ed12f5e495b (diff)
downloadblackbird-op-linux-638f293307b5787b69bf0a0bc915aed491efbec9.tar.gz
blackbird-op-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) {
OpenPOWER on IntegriCloud