projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ce42e8
)
rtc: rv8803: simplify the return expression of rv8803_nvram_write
author
Liu Shixin
<liushixin2@huawei.com>
Mon, 21 Sep 2020 08:24:49 +0000
(16:24 +0800)
committer
Alexandre Belloni
<alexandre.belloni@bootlin.com>
Tue, 29 Sep 2020 20:20:10 +0000
(22:20 +0200)
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
drivers/rtc/rtc-rv8803.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-rv8803.c
b/drivers/rtc/rtc-rv8803.c
index 93c3a6b627bdeafbe141f8efa4b82a1b555fcbbb..c6d8e3425688b97a6475b393b6ffb66c7c32ecdf 100644
(file)
--- 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,