diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-21 10:24:49 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2020-09-29 22:20:10 +0200 |
commit | 179b4bcc4c0cf62e3737c718e05f5a69b3e9041c (patch) | |
tree | 699732774354e823c326537f39b10973338f1971 /drivers/rtc/rtc-rv8803.c | |
parent | rtc: meson: simplify the return expression of meson_vrtc_probe (diff) | |
download | linux-179b4bcc4c0cf62e3737c718e05f5a69b3e9041c.tar.xz linux-179b4bcc4c0cf62e3737c718e05f5a69b3e9041c.zip |
rtc: rv8803: simplify the return expression of rv8803_nvram_write
Simplify the return expression.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20200921082449.2591981-1-liushixin2@huawei.com
Diffstat (limited to 'drivers/rtc/rtc-rv8803.c')
-rw-r--r-- | drivers/rtc/rtc-rv8803.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index 93c3a6b627bd..c6d8e3425688 100644 --- a/drivers/rtc/rtc-rv8803.c +++ b/drivers/rtc/rtc-rv8803.c @@ -454,13 +454,7 @@ static int rv8803_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) static int rv8803_nvram_write(void *priv, unsigned int offset, void *val, size_t bytes) { - int ret; - - ret = rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val); - if (ret) - return ret; - - return 0; + return rv8803_write_reg(priv, RV8803_RAM, *(u8 *)val); } static int rv8803_nvram_read(void *priv, unsigned int offset, |