From: Amos Kong Date: Wed, 23 May 2012 03:58:40 +0000 (-0600) Subject: PCI: acpiphp: fix function 0 leak when disabling a slot X-Git-Tag: v3.6-rc1~112^2~20^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=638f293307b5787b69bf0a0bc915aed491efbec9;p=~emulex%2Finfiniband.git 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 Signed-off-by: Bjorn Helgaas --- 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) {