Skip to content

Commit 3edf29d

Browse files
Colin Ian Kingalexandrebelloni
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 6487a80 commit 3edf29d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ int rtc_hctosys_ret = -ENODEV;
4848

4949
static void rtc_hctosys(struct rtc_device *rtc)
5050
{
51-
int err = -ENODEV;
51+
int err;
5252
struct rtc_time tm;
5353
struct timespec64 tv64 = {
5454
.tv_nsec = NSEC_PER_SEC >> 1,

0 commit comments

Comments
 (0)