From: Thomas Weißschuh (Schneider Electric) Date: Wed, 11 Mar 2026 10:15:16 +0000 (+0100) Subject: hrtimer: Don't zero-initialize ret in hrtimer_nanosleep() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=194675f16d7307a0109b54cf350ef9f81617f006;p=thirdparty%2Fkernel%2Flinux.git hrtimer: Don't zero-initialize ret in hrtimer_nanosleep() The value will be assigned to before any usage. No other function in hrtimer.c does such a zero-initialization. Signed-off-by: Thomas Weißschuh (Schneider Electric) Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-7-095357392669@linutronix.de --- diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index cafd6771a2255..c7e7d3a0d6bbb 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2329,7 +2329,7 @@ long hrtimer_nanosleep(ktime_t rqtp, const enum hrtimer_mode mode, const clockid { struct restart_block *restart; struct hrtimer_sleeper t; - int ret = 0; + int ret; hrtimer_setup_sleeper_on_stack(&t, clockid, mode); hrtimer_set_expires_range_ns(&t.timer, rqtp, current->timer_slack_ns);