diff options
author | Tero Kristo <t-kristo@ti.com> | 2020-09-07 11:25:59 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-05 11:43:20 +0100 |
commit | 660e2d9d14174a06da03d29c3a6e01e40b47f60b (patch) | |
tree | 18f4c3bd0d1065d8b14ee12ce3da21eb3b040168 /drivers/clk/ti | |
parent | f66125e1c4df1eb634732d78ebecc96ee902d5fb (diff) | |
download | linux-stable-660e2d9d14174a06da03d29c3a6e01e40b47f60b.tar.gz linux-stable-660e2d9d14174a06da03d29c3a6e01e40b47f60b.tar.bz2 linux-stable-660e2d9d14174a06da03d29c3a6e01e40b47f60b.zip |
clk: ti: clockdomain: fix static checker warning
[ Upstream commit b7a7943fe291b983b104bcbd2f16e8e896f56590 ]
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>
Diffstat (limited to 'drivers/clk/ti')
-rw-r--r-- | drivers/clk/ti/clockdomain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c index 423a99b9f10c..8d0dea188a28 100644 --- a/drivers/clk/ti/clockdomain.c +++ b/drivers/clk/ti/clockdomain.c @@ -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); } } |