[tip:,timers/core] alarmtimer: Remove unnecessary initialization of variable 'ret'

Message ID 168712139462.404.10986834065061459424.tip-bot2@tip-bot2
State New
Headers
Series [tip:,timers/core] alarmtimer: Remove unnecessary initialization of variable 'ret' |

Commit Message

tip-bot2 for Thomas Gleixner June 18, 2023, 8:49 p.m. UTC
  The following commit has been merged into the timers/core branch of tip:

Commit-ID:     986af8dc5af834071a8a7afdf2c3b7a57d562df2
Gitweb:        https://git.kernel.org/tip/986af8dc5af834071a8a7afdf2c3b7a57d562df2
Author:        Li zeming <zeming@nfschina.com>
AuthorDate:    Sat, 10 Jun 2023 02:28:56 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 18 Jun 2023 22:41:53 +02:00

alarmtimer: Remove unnecessary initialization of variable 'ret'

ret is assigned before checked, so it does not need to initialize the
variable

Signed-off-by: Li zeming <zeming@nfschina.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230609182856.4660-1-zeming@nfschina.com

---
 kernel/time/alarmtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 82b28ab..09c9cde 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -847,7 +847,7 @@  static int alarm_timer_nsleep(const clockid_t which_clock, int flags,
 	struct restart_block *restart = &current->restart_block;
 	struct alarm alarm;
 	ktime_t exp;
-	int ret = 0;
+	int ret;
 
 	if (!alarmtimer_get_rtcdev())
 		return -EOPNOTSUPP;