mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-11 23:27:42 +07:00
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>
This commit is contained in:
parent
06aef8cec7
commit
638f293307
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user