[PATCH] time: ntp: Remove unnecessary ‘-ENODEV’ values from err

From: Li zeming
Date: Sun Jun 25 2023 - 21:54:33 EST


err is assigned first, so it does not need to initialize the assignment.

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

diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
index 406dccb79c2b..3808bbf4db0c 100644
--- a/kernel/time/ntp.c
+++ b/kernel/time/ntp.c
@@ -582,7 +582,7 @@ static int update_rtc(struct timespec64 *to_set, unsigned long *offset_nsec)
{
struct rtc_device *rtc;
struct rtc_time tm;
- int err = -ENODEV;
+ int err;

rtc = rtc_class_open(CONFIG_RTC_SYSTOHC_DEVICE);
if (!rtc)
--
2.18.2