Commit ed8167cb authored by Chen Hui's avatar Chen Hui Committed by Tony Lindgren

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: fa6d79d2 ("ARM: OMAP: Add initialisation for the real-time counter.")
Signed-off-by: default avatarChen Hui <judy.chenhui@huawei.com>
Message-Id: <20221108141917.46796-1-judy.chenhui@huawei.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7c32919a
......@@ -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()) {
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment