Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8041f9a2 authored by Chen Hui's avatar Chen Hui Committed by Greg Kroah-Hartman
Browse files

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: 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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent dd08e68d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -700,6 +700,7 @@ static void __init realtime_counter_init(void)
	}

	rate = clk_get_rate(sys_clk);
	clk_put(sys_clk);

	if (soc_is_dra7xx()) {
		/*