Skip to content

Commit

Permalink
alarmtimer: Remove unnecessary initialization of variable 'ret'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Li zeming authored and KAGA-KOKO committed Jun 18, 2023
1 parent b9a40f2 commit 986af8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/time/alarmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 986af8d

Please sign in to comment.