summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorChen Hui <judy.chenhui@huawei.com>2022-11-08 22:19:17 +0800
committerTony Lindgren <tony@atomide.com>2022-12-27 07:21:41 +0200
commited8167cbf65c2b6ff6faeb0f96ded4d6d581e1ac (patch)
tree2038d79cb352148335ec76f0fa693d5539fe38f2 /arch/arm/mach-omap2
parent7c32919a378782c95c72bc028b5c30dfe8c11f82 (diff)
ARM: OMAP2+: Fix memory leak in realtime_counter_init()
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>
Diffstat (limited to 'arch/arm/mach-omap2')
-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 620ba69c8f11..5677c4a08f37 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -76,6 +76,7 @@ static void __init realtime_counter_init(void)
}
rate = clk_get_rate(sys_clk);
+ clk_put(sys_clk);
if (soc_is_dra7xx()) {
/*