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

Commit 54cc10a0 authored by Feng Mingxi's avatar Feng Mingxi Committed by Greg Kroah-Hartman
Browse files

clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe



[ Upstream commit 8b5bf64c89c7100c921bd807ba39b2eb003061ab ]

Smatch reports:
drivers/clocksource/timer-cadence-ttc.c:529 ttc_timer_probe()
warn: 'timer_baseaddr' from of_iomap() not released on lines: 498,508,516.

timer_baseaddr may have the problem of not being released after use,
I replaced it with the devm_of_iomap() function and added the clk_put()
function to cleanup the "clk_ce" and "clk_cs".

Fixes: e932900a ("arm: zynq: Use standard timer binding")
Fixes: 70504f31 ("clocksource/drivers/cadence_ttc: Convert init function to return error")
Signed-off-by: default avatarFeng Mingxi <m202271825@hust.edu.cn>
Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Acked-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230425065611.702917-1-m202271825@hust.edu.cn


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 38ca169d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment