Skip to content

Commit bce7a01

Browse files
Minghao Chialexandrebelloni
authored andcommitted
rtc: simplify the return expression of rx8025_set_offset()
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
1 parent aabfe05 commit bce7a01

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/rtc/rtc-rx8025.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ static int rx8025_set_offset(struct device *dev, long offset)
436436
{
437437
struct i2c_client *client = to_i2c_client(dev);
438438
u8 digoff;
439-
int err;
440439

441440
offset /= RX8025_ADJ_RESOLUTION;
442441
if (offset > RX8025_ADJ_DATA_MAX)
@@ -449,11 +448,7 @@ static int rx8025_set_offset(struct device *dev, long offset)
449448
offset += 128;
450449
digoff = offset;
451450

452-
err = rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
453-
if (err)
454-
return err;
455-
456-
return 0;
451+
return rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
457452
}
458453

459454
static const struct rtc_class_ops rx8025_rtc_ops = {

0 commit comments

Comments
 (0)