diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-15 05:45:52 +0000 |
|---|---|---|
| committer | Daniel Lezcano <daniel.lezcano@kernel.org> | 2026-10-07 15:46:14 +0200 |
| commit | 36790ef57803400339d8ea4081d85483264dbd6c (patch) | |
| tree | e74494f2b2dcd8bc40f39ccfd29e482538eef556 /include/linux/platform_data | |
| parent | 9cc2e18b32f12d26ae6729c62a03640423956b17 (diff) | |
| download | linux-next-36790ef57803400339d8ea4081d85483264dbd6c.tar.gz linux-next-36790ef57803400339d8ea4081d85483264dbd6c.zip | |
clocksource/drivers/timer-econet-en751221: Fix clock reference leak
timer_init() obtains the timer clock with of_clk_get() and only reads
its frequency with clk_get_rate(); the clock is never prepared nor
enabled. All four return paths after the acquisition (of_iomap()
failure, clocksource_mmio_init() failure, cevt_init() failure and
success) return without clk_put(), leaking the consumer reference.
Drop the reference with clk_put() right after the frequency has been
read. The clock enable state is untouched.
Fixes: 3b4c33ac87d0 ("clocksource/drivers: Add EcoNet Timer HPT driver")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Tested-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://patch.msgid.link/20260915054552.1729612-1-vulab@iscas.ac.cn
Diffstat (limited to 'include/linux/platform_data')
0 files changed, 0 insertions, 0 deletions
