projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aabfe05
)
rtc: simplify the return expression of rx8025_set_offset()
author
Minghao Chi
<chi.minghao@zte.com.cn>
Thu, 5 May 2022 02:23:14 +0000
(
02:23
+0000)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Tue, 17 May 2022 22:18:19 +0000
(
00:18
+0200)
Simplify the return expression.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link:
https://lore.kernel.org/r/20220505022314.59822-1-chi.minghao@zte.com.cn
drivers/rtc/rtc-rx8025.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-rx8025.c
b/drivers/rtc/rtc-rx8025.c
index 5bfdd34a72fffad8c5dfb256b1f5b821d28dff06..b32117ccd74bd21d1a20f0f5463d4c2d225ee7ac 100644
(file)
--- a/
drivers/rtc/rtc-rx8025.c
+++ b/
drivers/rtc/rtc-rx8025.c
@@
-436,7
+436,6
@@
static int rx8025_set_offset(struct device *dev, long offset)
{
struct i2c_client *client = to_i2c_client(dev);
u8 digoff;
- int err;
offset /= RX8025_ADJ_RESOLUTION;
if (offset > RX8025_ADJ_DATA_MAX)
@@
-449,11
+448,7
@@
static int rx8025_set_offset(struct device *dev, long offset)
offset += 128;
digoff = offset;
- err = rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
- if (err)
- return err;
-
- return 0;
+ return rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
}
static const struct rtc_class_ops rx8025_rtc_ops = {