ARM: OMAP2+: Fix memory leak in realtime_counter_init()
authorChen Hui <judy.chenhui@huawei.com>
Tue, 8 Nov 2022 14:19:17 +0000 (22:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:38:57 +0000 (09:38 +0100)
commit10fcdad2b9f3f424873714eb8713a3e6f7ab84bb
tree455b680d48eda6249d89e42a0d952f8a75d0477a
parente2f62d8302bb819537ed39af9cfc4504333b515c
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm/mach-omap2/timer.c