Skip to content

Commit 2a8da85

Browse files
Stanimir Varbanovpopcornmix
authored andcommitted
PCI: brcmstb: Fix for missing of_node_put
A call to of_parse_phandle() increments refcount, of_node_put must be called when done the work on it. Fix missing of_node_put() on the msi_np device node by using scope based of_node_put() cleanups. Cc: stable@vger.kernel.org # v5.10+ Fixes: 40ca1bf ("PCI: brcmstb: Add MSI support") Signed-off-by: Stanimir Varbanov <svarbanov@suse.de>
1 parent cab64df commit 2a8da85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,8 @@ static struct pci_ops brcm7425_pcie_ops = {
18441844

18451845
static int brcm_pcie_probe(struct platform_device *pdev)
18461846
{
1847-
struct device_node *np = pdev->dev.of_node, *msi_np;
1847+
struct device_node *msi_np __free(device_node) = NULL;
1848+
struct device_node *np = pdev->dev.of_node;
18481849
struct pci_host_bridge *bridge;
18491850
const struct pcie_cfg_data *data;
18501851
struct brcm_pcie *pcie;

0 commit comments

Comments
 (0)