[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201027001123.1027642-17-sashal@kernel.org>
Date: Mon, 26 Oct 2020 20:11:15 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Tero Kristo <t-kristo@...com>, Dan Murphy <dmurphy@...com>,
Stephen Boyd <sboyd@...nel.org>,
Sasha Levin <sashal@...nel.org>, linux-omap@...r.kernel.org,
linux-clk@...r.kernel.org
Subject: [PATCH AUTOSEL 4.4 17/25] clk: ti: clockdomain: fix static checker warning
From: Tero Kristo <t-kristo@...com>
[ Upstream commit b7a7943fe291b983b104bcbd2f16e8e896f56590 ]
Fix a memory leak induced by not calling clk_put after doing of_clk_get.
Reported-by: Dan Murphy <dmurphy@...com>
Signed-off-by: Tero Kristo <t-kristo@...com>
Link: https://lore.kernel.org/r/20200907082600.454-3-t-kristo@ti.com
Signed-off-by: Stephen Boyd <sboyd@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/clk/ti/clockdomain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c
index b9bc3b8df659d..4fde9767392e3 100644
--- a/drivers/clk/ti/clockdomain.c
+++ b/drivers/clk/ti/clockdomain.c
@@ -124,10 +124,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);
}
}
--
2.25.1
Powered by blists - more mailing lists