diff options
author | Scott Murray <scottm@somanetworks.com> | 2005-06-06 15:48:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-09 01:37:59 -0700 |
commit | 03e49d40ea3436cae0fe43708f11584130ee4a0c (patch) | |
tree | acaa11b11c0ff1d4c9f743c0d8df2bc5a865a440 /drivers/pci/hotplug/cpci_hotplug_pci.c | |
parent | 5273a00d9c763108397658d440618f7ac3e40f83 (diff) |
[PATCH] PCI Hotplug: fix CPCI reference counting bug
Here's a patch that fixes up the pci_dev refcounting in the CPCI code.
I've done some testing against it and it seems fine here.
Signed-off-by: Scott Murray <scottm@somanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/cpci_hotplug_pci.c')
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_pci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c index c878028ad21..225b5e551dd 100644 --- a/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/drivers/pci/hotplug/cpci_hotplug_pci.c @@ -315,9 +315,12 @@ int cpci_unconfigure_slot(struct slot* slot) PCI_DEVFN(PCI_SLOT(slot->devfn), i)); if (dev) { pci_remove_bus_device(dev); - slot->dev = NULL; + pci_dev_put(dev); } } + pci_dev_put(slot->dev); + slot->dev = NULL; + dbg("%s - exit", __FUNCTION__); return 0; } |