diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-15 04:54:26 +0000 |
|---|---|---|
| committer | Daniel Lezcano <daniel.lezcano@kernel.org> | 2026-10-07 15:44:05 +0200 |
| commit | 277e5657237a92e279ee28da2f5c07902cc6aa0b (patch) | |
| tree | 4dd1e185542603d03dfa9360096b5113cd43237d /scripts/Makefile.thinlto | |
| parent | 8f30b035a6676e292ee8e54334711d9905dd0495 (diff) | |
| download | linux-277e5657237a92e279ee28da2f5c07902cc6aa0b.tar.gz linux-277e5657237a92e279ee28da2f5c07902cc6aa0b.zip | |
clocksource/drivers/fttmr010: Fix clk reference leak in error paths
fttmr010_common_init() obtains the PCLK reference with
of_clk_get_by_name() but never calls clk_put(). If clk_prepare_enable()
fails the reference is leaked directly, and every error path that jumps
to out_disable_clock only calls clk_disable_unprepare(), which releases
the prepare/enable state but not the reference obtained from
of_clk_get_by_name().
Add clk_put() to the clk_prepare_enable() failure path and to the
out_disable_clock label so the clock reference is no longer leaked. The
success path keeps PCLK enabled for the lifetime of the timer and is
left untouched.
Fixes: dd98442e17a6 ("clocksource/drivers/fttmr010: Drop Gemini specifics")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260915045426.1726805-1-vulab@iscas.ac.cn
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
