projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c32919
)
ARM: OMAP2+: Fix memory leak in realtime_counter_init()
author
Chen Hui
<judy.chenhui@huawei.com>
Tue, 8 Nov 2022 14:19:17 +0000
(22:19 +0800)
committer
Tony Lindgren
<tony@atomide.com>
Tue, 27 Dec 2022 05:21:41 +0000
(07:21 +0200)
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>
arch/arm/mach-omap2/timer.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/mach-omap2/timer.c
b/arch/arm/mach-omap2/timer.c
index 620ba69c8f114facc8ae5a626c6f0b0204d5e2d7..5677c4a08f37650c819aba6bf86243ad6e095657 100644
(file)
--- 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()) {
/*