mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-18 16:44:33 +00:00
clk: ti: clockdomain: fix static checker warning
[ Upstream commit b7a7943fe2
]
Fix a memory leak induced by not calling clk_put after doing of_clk_get.
Reported-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Link: https://lore.kernel.org/r/20200907082600.454-3-t-kristo@ti.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fe5fe1ec36
commit
1712a5d8dc
1 changed files with 2 additions and 0 deletions
|
@ -146,10 +146,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node)
|
|||
if (clk_hw_get_flags(clk_hw) & CLK_IS_BASIC) {
|
||||
pr_warn("can't setup clkdm for basic clk %s\n",
|
||||
__clk_get_name(clk));
|
||||
clk_put(clk);
|
||||
continue;
|
||||
}
|
||||
to_clk_hw_omap(clk_hw)->clkdm_name = clkdm_name;
|
||||
omap2_init_clk_clkdm(clk_hw);
|
||||
clk_put(clk);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue