time: posix-timers: Remove unnecessary ‘0’ values from error

Message ID 20230627190400.5501-1-zeming@nfschina.com
State New
Headers
Series time: posix-timers: Remove unnecessary ‘0’ values from error |

Commit Message

Li zeming June 27, 2023, 7:04 p.m. UTC
  error is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 kernel/time/posix-timers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

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))