[PATCH] time: posix-timers: Remove unnecessary ‘0’ values from error
From: Li zeming
Date: Sun Jun 25 2023 - 22:32:48 EST
error is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@xxxxxxxxxxxx>
---
kernel/time/posix-timers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 808a247205a9..4e9a1676101b 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -906,7 +906,7 @@ static int do_timer_settime(timer_t timer_id, int tmr_flags,
const struct k_clock *kc;
struct k_itimer *timr;
unsigned long flags;
- int error = 0;
+ int error;
if (!timespec64_valid(&new_spec64->it_interval) ||
!timespec64_valid(&new_spec64->it_value))
--
2.18.2