mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 17:23:36 +00:00
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: fa6d79d276
("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>
This commit is contained in:
parent
7c32919a37
commit
ed8167cbf6
@ -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()) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user