Skip to content
Commit 8b5bf64c authored by Feng Mingxi's avatar Feng Mingxi Committed by Daniel Lezcano
Browse files

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

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
parent 6d0d4df8
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