mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-29 02:59:13 +00:00
soc: bcm: brcmstb: biuctrl: Add missing of_node_put()
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 <windhl@126.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This commit is contained in:
parent
9b65687904
commit
9a073d4fbb
@ -340,12 +340,12 @@ static int __init brcmstb_biuctrl_init(void)
|
|||||||
|
|
||||||
ret = setup_hifcpubiuctrl_regs(np);
|
ret = setup_hifcpubiuctrl_regs(np);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto out_put;
|
||||||
|
|
||||||
ret = mcp_write_pairing_set();
|
ret = mcp_write_pairing_set();
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("MCP: Unable to disable write pairing!\n");
|
pr_err("MCP: Unable to disable write pairing!\n");
|
||||||
return ret;
|
goto out_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
a72_b53_rac_enable_all(np);
|
a72_b53_rac_enable_all(np);
|
||||||
@ -353,6 +353,9 @@ static int __init brcmstb_biuctrl_init(void)
|
|||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
register_syscore_ops(&brcmstb_cpu_credit_syscore_ops);
|
register_syscore_ops(&brcmstb_cpu_credit_syscore_ops);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
ret = 0;
|
||||||
|
out_put:
|
||||||
|
of_node_put(np);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
early_initcall(brcmstb_biuctrl_init);
|
early_initcall(brcmstb_biuctrl_init);
|
||||||
|
Loading…
Reference in New Issue
Block a user