Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -957,9 +957,11 @@ static void eeh_remove_device(struct pci_dev *dev)
	pci_addr_cache_remove_device(dev);

	dn = pci_device_to_OF_node(dev);
	if (PCI_DN(dn)->pcidev) {
		PCI_DN(dn)->pcidev = NULL;
		pci_dev_put (dev);
	}
}

void eeh_remove_bus_device(struct pci_dev *dev)
{