提交 bce7a01a 编写于 作者: M Minghao Chi 提交者: Alexandre Belloni

rtc: simplify the return expression of rx8025_set_offset()

Simplify the return expression.
Reported-by: NZeal Robot <zealci@zte.com.cn>
Signed-off-by: NMinghao Chi <chi.minghao@zte.com.cn>
Reviewed-by: NNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220505022314.59822-1-chi.minghao@zte.com.cn
上级 aabfe05a
...@@ -436,7 +436,6 @@ static int rx8025_set_offset(struct device *dev, long offset) ...@@ -436,7 +436,6 @@ static int rx8025_set_offset(struct device *dev, long offset)
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
u8 digoff; u8 digoff;
int err;
offset /= RX8025_ADJ_RESOLUTION; offset /= RX8025_ADJ_RESOLUTION;
if (offset > RX8025_ADJ_DATA_MAX) if (offset > RX8025_ADJ_DATA_MAX)
...@@ -449,11 +448,7 @@ static int rx8025_set_offset(struct device *dev, long offset) ...@@ -449,11 +448,7 @@ static int rx8025_set_offset(struct device *dev, long offset)
offset += 128; offset += 128;
digoff = offset; digoff = offset;
err = rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff); return rx8025_write_reg(client, RX8025_REG_DIGOFF, digoff);
if (err)
return err;
return 0;
} }
static const struct rtc_class_ops rx8025_rtc_ops = { static const struct rtc_class_ops rx8025_rtc_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册