Commit 638f2933 authored by Amos Kong's avatar Amos Kong Committed by Bjorn Helgaas
Browse files

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: default avatarAmos Kong <kongjianjun@gmail.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 06aef8ce
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) {