]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hrtimer: Don't zero-initialize ret in hrtimer_nanosleep()
authorThomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Wed, 11 Mar 2026 10:15:16 +0000 (11:15 +0100)
committerThomas Gleixner <tglx@kernel.org>
Thu, 12 Mar 2026 11:15:55 +0000 (12:15 +0100)
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) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260311-hrtimer-cleanups-v1-7-095357392669@linutronix.de
kernel/time/hrtimer.c

index cafd6771a225514577bdff6a8ac347b7084735cf..c7e7d3a0d6bbbc5e83f944c894f1fae5991d6ae0 100644 (file)
@@ -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);