Skip to contentSkip to conversation

rtc: rv8803: simplify the return expression of rv8803_nvram_write

PATCH Applied Liu Shixin 2 participants 2 messages Sep 21, 2020 – Sep 29, 2020 Real time clock (RTC)

lore
Share & tools
lore

Liu Shixin

author
#0 lore raw

PATCH 1/1 rtc: rv8803: simplify the return expression of rv8803_nvram_write

Simplify the return expression.

---
 drivers/rtc/rtc-rv8803.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/rtc/rtc-rv8803.c +1 -7
index 93c3a6b627bd..c6d8e3425688 100644
@@ -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,
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 1 line · Liu Shixin

Simplify the return expression.

Applied, thanks!

[1/1] rtc: rv8803: simplify the return expression of rv8803_nvram_write

      commit: 179b4bcc4c0cf62e3737c718e05f5a69b3e9041c

Best regards,

Signature · 1 line
Alexandre Belloni <[email protected]>