Skip to content

Commit

Permalink
PCI: acpiphp: fix function 0 leak when disabling a slot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amos Kong authored and Bjorn Helgaas committed Jun 13, 2012
1 parent 06aef8c commit 638f293
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 638f293

Please sign in to comment.