diff options
author | ye xingchen <[email protected]> | 2022-09-05 09:01:19 +0000 |
---|---|---|
committer | Alexandre Belloni <[email protected]> | 2022-11-15 21:01:51 +0100 |
commit | f8513363b0b7155afaee09cca777fc608dc957e3 (patch) | |
tree | 787fe2a2ca4fc50b156822e75e2493920c89de18 | |
parent | c69bffe199270ce001d5764985a8e414c7e05fee (diff) |
rtc: s35390a: Remove the unneeded result variable
Return the value s35390a_set_reg() directly instead of storing it in
another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: ye xingchen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
-rw-r--r-- | drivers/rtc/rtc-s35390a.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-s35390a.c b/drivers/rtc/rtc-s35390a.c index 81d97b1d3159..b18daaf72b17 100644 --- a/drivers/rtc/rtc-s35390a.c +++ b/drivers/rtc/rtc-s35390a.c @@ -211,7 +211,7 @@ static int s35390a_rtc_set_time(struct device *dev, struct rtc_time *tm) { struct i2c_client *client = to_i2c_client(dev); struct s35390a *s35390a = i2c_get_clientdata(client); - int i, err; + int i; char buf[7], status; dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d mday=%d, " @@ -234,9 +234,7 @@ static int s35390a_rtc_set_time(struct device *dev, struct rtc_time *tm) for (i = 0; i < 7; ++i) buf[i] = bitrev8(buf[i]); - err = s35390a_set_reg(s35390a, S35390A_CMD_TIME1, buf, sizeof(buf)); - - return err; + return s35390a_set_reg(s35390a, S35390A_CMD_TIME1, buf, sizeof(buf)); } static int s35390a_rtc_read_time(struct device *dev, struct rtc_time *tm) |