qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disab


From: Bjorn Helgaas
Subject: [Qemu-devel] [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disabling a slot
Date: Tue, 22 May 2012 22:35:06 -0600
User-agent: StGit/0.15

From: Amos Kong <address@hidden>

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 <address@hidden>
Signed-off-by: Bjorn Helgaas <address@hidden>
---
 drivers/pci/hotplug/acpiphp_glue.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c 
b/drivers/pci/hotplug/acpiphp_glue.c
index 62d0ae4..c8f9991 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) {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]