PCI: brcmstb: Fix refcount leak in brcm_pcie_probe
Subsystems (5)
PATCH 1/1 PCI: brcmstb: Fix refcount leak in brcm_pcie_probe
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
Fixes format:40ca1bf580ef ("PCI: brcmstb: Add MSI support")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/pci/controller/pcie-brcmstb.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pci/controller/pcie-brcmstb.c +2 -0
@@ -1597,8 +1597,10 @@ static int brcm_pcie_probe(struct platform_device *pdev) ret =brcm_pcie_enable_msi (pcie);if (ret) {dev_err (pcie->dev,"probe of internal MSI failed" ); +of_node_put (msi_np); goto fail; } +of_node_put (msi_np); } bridge->ops = pcie->type ==BCM7425 ? &brcm_pcie_ops32 : &brcm_pcie_ops;
Signature · 1 line
2.25.1