mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
soc: bcm: brcmstb: Add of_node_put() in pm-mips
Fix following coccicheck warning: ./drivers/soc/bcm/brcmstb/pm/pm-mips.c:404:1-23: WARNING: Function for_each_matching_node should have of_node_put() before goto or break Early exits from for_each_matching_node should decrement the node reference counter. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
This commit is contained in:
parent
fa55b7dcdc
commit
f5029f62d9
@ -405,11 +405,14 @@ static int brcmstb_pm_init(void)
|
||||
i = ctrl.num_memc;
|
||||
if (i >= MAX_NUM_MEMC) {
|
||||
pr_warn("Too many MEMCs (max %d)\n", MAX_NUM_MEMC);
|
||||
of_node_put(dn);
|
||||
break;
|
||||
}
|
||||
base = brcmstb_ioremap_node(dn, 0);
|
||||
if (IS_ERR(base))
|
||||
if (IS_ERR(base)) {
|
||||
of_node_put(dn);
|
||||
goto ddr_err;
|
||||
}
|
||||
|
||||
ctrl.memcs[i].ddr_phy_base = base;
|
||||
ctrl.num_memc++;
|
||||
|
Loading…
Reference in New Issue
Block a user