summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChen Hui <judy.chenhui@huawei.com>2022-11-08 22:19:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-11 16:26:33 +0100
commit5f9aedabce3404dd8bb769822fc11317c55fbdc1 (patch)
tree408f964418981145cf289613bf1ccfea59b62e7a /arch
parentdf0fad94ca3787727b9cdd76797aaacf46fe93ed (diff)
downloadlinux-stable-5f9aedabce3404dd8bb769822fc11317c55fbdc1.tar.gz
linux-stable-5f9aedabce3404dd8bb769822fc11317c55fbdc1.tar.bz2
linux-stable-5f9aedabce3404dd8bb769822fc11317c55fbdc1.zip
ARM: OMAP2+: Fix memory leak in realtime_counter_init()
[ Upstream commit ed8167cbf65c2b6ff6faeb0f96ded4d6d581e1ac ] The "sys_clk" resource is malloced by clk_get(), it is not released when the function return. Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter.") Signed-off-by: Chen Hui <judy.chenhui@huawei.com> Message-Id: <20221108141917.46796-1-judy.chenhui@huawei.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index d61fbd7a2840..c421d12b3203 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -562,6 +562,7 @@ static void __init realtime_counter_init(void)
}
rate = clk_get_rate(sys_clk);
+ clk_put(sys_clk);
if (soc_is_dra7xx()) {
/*