OSDN Git Service

clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systime...
authorYang Yingliang <yangyingliang@huawei.com>
Sat, 29 Oct 2022 11:44:27 +0000 (19:44 +0800)
committerDaniel Lezcano <daniel.lezcano@kernel.org>
Fri, 2 Dec 2022 12:16:46 +0000 (13:16 +0100)
commit180d35a7c05d520314a590c99ad8643d0213f28b
tree4e6e25a38df6044e01de97ac8cb44ece014a1e53
parent822963b96dfdb72ec4fb1395fbdfa778656b49d1
clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()

If clk_get_rate() fails which is called after clk_prepare_enable(),
clk_disable_unprepare() need be called in error path to disable the
clock in dmtimer_systimer_init_clock().

Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20221029114427.946520-1-yangyingliang@huawei.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
drivers/clocksource/timer-ti-dm-systimer.c