mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
of/pci: Fix pci_get_host_bridge_device leak
In case of error, the current code return w/o calling pci_put_host_bridge_device. This patch fixes this. Signed-off-by: Suravee Suthikulpanit <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
ab3d527329
commit
37efbe20fb
1 changed files with 2 additions and 3 deletions
|
|
@ -129,10 +129,9 @@ void of_pci_dma_configure(struct pci_dev *pci_dev)
|
|||
struct device *dev = &pci_dev->dev;
|
||||
struct device *bridge = pci_get_host_bridge_device(pci_dev);
|
||||
|
||||
if (!bridge->parent)
|
||||
return;
|
||||
if (bridge->parent)
|
||||
of_dma_configure(dev, bridge->parent->of_node);
|
||||
|
||||
of_dma_configure(dev, bridge->parent->of_node);
|
||||
pci_put_host_bridge_device(bridge);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_pci_dma_configure);
|
||||
|
|
|
|||
Loading…
Reference in a new issue