aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/cpci_hotplug_pci.c
diff options
context:
space:
mode:
authorScott Murray <scottm@somanetworks.com>2005-06-06 15:48:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-09 04:37:59 -0400
commit03e49d40ea3436cae0fe43708f11584130ee4a0c (patch)
treeacaa11b11c0ff1d4c9f743c0d8df2bc5a865a440 /drivers/pci/hotplug/cpci_hotplug_pci.c
parent5273a00d9c763108397658d440618f7ac3e40f83 (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.c5
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 c878028ad215..225b5e551dd6 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)
315 PCI_DEVFN(PCI_SLOT(slot->devfn), i)); 315 PCI_DEVFN(PCI_SLOT(slot->devfn), i));
316 if (dev) { 316 if (dev) {
317 pci_remove_bus_device(dev); 317 pci_remove_bus_device(dev);
318 slot->dev = NULL; 318 pci_dev_put(dev);
319 } 319 }
320 } 320 }
321 pci_dev_put(slot->dev);
322 slot->dev = NULL;
323
321 dbg("%s - exit", __FUNCTION__); 324 dbg("%s - exit", __FUNCTION__);
322 return 0; 325 return 0;
323} 326}