summaryrefslogtreecommitdiff
path: root/kernel/time/timer.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-11-26 22:56:01 +0000
committerMark Brown <broonie@kernel.org>2025-11-26 22:56:01 +0000
commit5d0cad409099798462d8a46756be537730bd8a22 (patch)
tree76b1d8dd3439e966e69a266144330ce8cfa9a124 /kernel/time/timer.c
parent994a0b2eb605144871a85fac29a2c4bdbac07131 (diff)
parent3a03de362975398b39d4c6df7325ccb982026a8f (diff)
ASoC: stm32: sai: fix device and OF node leaks on
Merge series from Johan Hovold <johan@kernel.org>: This series fixes device and OF node reference leaks during probe and a clock prepare imbalance on probe failures. Included is a related cleanup of an error path.
Diffstat (limited to 'kernel/time/timer.c')
-rw-r--r--kernel/time/timer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 553fa469d7cc..d5ebb1d927ea 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1458,10 +1458,11 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown)
base = lock_timer_base(timer, &flags);
- if (base->running_timer != timer)
+ if (base->running_timer != timer) {
ret = detach_if_pending(timer, base, true);
- if (shutdown)
- timer->function = NULL;
+ if (shutdown)
+ timer->function = NULL;
+ }
raw_spin_unlock_irqrestore(&base->lock, flags);