From: Colin Ian King Date: Thu, 2 Apr 2020 11:04:11 +0000 (+0100) Subject: rtc: class: remove redundant assignment to variable err X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=3edf29d9d585237c53f06e44227c4b36c8794222;p=linux.git rtc: class: remove redundant assignment to variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200402110411.508534-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 03d6516941a8f..7c88d190c51fc 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -48,7 +48,7 @@ int rtc_hctosys_ret = -ENODEV; static void rtc_hctosys(struct rtc_device *rtc) { - int err = -ENODEV; + int err; struct rtc_time tm; struct timespec64 tv64 = { .tv_nsec = NSEC_PER_SEC >> 1,