public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] time: ntp: Remove unnecessary ‘-ENODEV’ values from err
@ 2023-06-27 18:25 Li zeming
  2023-06-26  4:05 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Li zeming @ 2023-06-27 18:25 UTC (permalink / raw)
  To: jstultz, tglx, sboyd; +Cc: linux-kernel, Li zeming

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

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-26 20:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 18:25 [PATCH] time: ntp: Remove unnecessary ‘-ENODEV’ values from err Li zeming
2023-06-26  4:05 ` kernel test robot
2023-06-26  4:05 ` kernel test robot
2023-06-26 20:53 ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox