提交 638f2933 编写于 作者: Amos_沧海桑田's avatar Amos_沧海桑田 提交者: Bjorn Helgaas

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_沧海桑田's avatarAmos Kong <kongjianjun@gmail.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 06aef8ce
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册