Skip to content

Commit

Permalink
soc: bcm: brcmstb: biuctrl: Add missing of_node_put()
Browse files Browse the repository at this point in the history
In brcmstb_biuctrl_init(), of_find_compatible_node() will return a
node pointer with refcount incremented. We should use of_node_put()
in each fail path or when it is not used anymore.

Signed-off-by: Liang He <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
  • Loading branch information
windhl authored and ffainelli committed Jun 17, 2022
1 parent 9b65687 commit 9a073d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/soc/bcm/brcmstb/biuctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,22 @@ static int __init brcmstb_biuctrl_init(void)

ret = setup_hifcpubiuctrl_regs(np);
if (ret)
return ret;
goto out_put;

ret = mcp_write_pairing_set();
if (ret) {
pr_err("MCP: Unable to disable write pairing!\n");
return ret;
goto out_put;
}

a72_b53_rac_enable_all(np);
mcp_a72_b53_set();
#ifdef CONFIG_PM_SLEEP
register_syscore_ops(&brcmstb_cpu_credit_syscore_ops);
#endif
return 0;
ret = 0;
out_put:
of_node_put(np);
return ret;
}
early_initcall(brcmstb_biuctrl_init);

0 comments on commit 9a073d4

Please sign in to comment.