summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-04-02 13:04:11 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-04-02 18:47:30 +0200
commit3edf29d9d585237c53f06e44227c4b36c8794222 (patch)
tree2856cc14435cd148d73bfd88181371ffc747e2ad /drivers/rtc
parentrtc: remove rtc_time_to_tm and rtc_tm_to_time (diff)
downloadlinux-3edf29d9d585237c53f06e44227c4b36c8794222.tar.xz
linux-3edf29d9d585237c53f06e44227c4b36c8794222.zip
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 <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200402110411.508534-1-colin.king@canonical.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 03d6516941a8..7c88d190c51f 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,