diff options
author | Liang He <windhl@126.com> | 2022-06-15 17:02:31 +0300 |
---|---|---|
committer | Florian Fainelli <f.fainelli@gmail.com> | 2022-06-18 00:54:22 +0300 |
commit | 9a073d4fbb182be8ee9d1539ed0484800f3fc832 (patch) | |
tree | 695ea620ac6029fa4a8d8df5c337e979bbca98ad /drivers/soc | |
parent | 9b656879042e1eb6aaf2306910f346bd6a03e58f (diff) | |
download | linux-9a073d4fbb182be8ee9d1539ed0484800f3fc832.tar.xz |
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>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/bcm/brcmstb/biuctrl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/soc/bcm/brcmstb/biuctrl.c b/drivers/soc/bcm/brcmstb/biuctrl.c index 2c975d79fe8e..1467bbd59690 100644 --- a/drivers/soc/bcm/brcmstb/biuctrl.c +++ b/drivers/soc/bcm/brcmstb/biuctrl.c @@ -340,12 +340,12 @@ 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); @@ -353,6 +353,9 @@ static int __init brcmstb_biuctrl_init(void) #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); |