Commit b055a9e1 authored by Linas Vepstas's avatar Linas Vepstas Committed by Paul Mackerras

[PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put

Repeated calls to eeh_remove_device() can result in multiple
(and thus unbalanced) calls to pci_dev_put(). Make sure the
pci_device_put() is called only once (since there was only
one call to the matching pci_device_get()).
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 6f806cee
...@@ -957,8 +957,10 @@ static void eeh_remove_device(struct pci_dev *dev) ...@@ -957,8 +957,10 @@ static void eeh_remove_device(struct pci_dev *dev)
pci_addr_cache_remove_device(dev); pci_addr_cache_remove_device(dev);
dn = pci_device_to_OF_node(dev); dn = pci_device_to_OF_node(dev);
if (PCI_DN(dn)->pcidev) {
PCI_DN(dn)->pcidev = NULL; PCI_DN(dn)->pcidev = NULL;
pci_dev_put (dev); pci_dev_put (dev);
}
} }
void eeh_remove_bus_device(struct pci_dev *dev) void eeh_remove_bus_device(struct pci_dev *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment