Skip to content

Commit

Permalink
clk: ti: clockdomain: fix static checker warning
Browse files Browse the repository at this point in the history
[ Upstream commit b7a7943 ]

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>
  • Loading branch information
Tero Kristo authored and gregkh committed Nov 5, 2020
1 parent f66125e commit 660e2d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clk/ti/clockdomain.c
Expand Up @@ -146,10 +146,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node)
if (!omap2_clk_is_hw_omap(clk_hw)) {
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);
}
}

Expand Down

0 comments on commit 660e2d9

Please sign in to comment.