]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clocksource/drivers/stm: Fix double deregistration on probe failure
authorJohan Hovold <johan@kernel.org>
Fri, 17 Oct 2025 05:50:39 +0000 (07:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:19 +0000 (14:03 +0100)
commit9876d55a04457317eede51d2bb43d0148790895d
treeda0905739dabd489df04ce9e248cb562a981e1ad
parentcbc8d54c7313be21f82c252bda35e2ba36c3b4b4
clocksource/drivers/stm: Fix double deregistration on probe failure

[ Upstream commit 6b38a8b31e2c5c2c3fd5f9848850788c190f216d ]

The purpose of the devm_add_action_or_reset() helper is to call the
action function in case adding an action ever fails so drop the clock
source deregistration from the error path to avoid deregistering twice.

Fixes: cec32ac75827 ("clocksource/drivers/nxp-timer: Add the System Timer Module for the s32gx platforms")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/20251017055039.7307-1-johan@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clocksource/timer-nxp-stm.c