All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rtc: rv8803: simplify the return expression of rv8803_nvram_write
@ 2020-09-21  8:24 Liu Shixin
  2020-09-29 20:20 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Liu Shixin @ 2020-09-21  8:24 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, linux-kernel, Liu Shixin

Simplify the return expression.

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
---
 drivers/rtc/rtc-rv8803.c | 8 +-------
 1 file changed, 1 insertion(+), 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,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] rtc: rv8803: simplify the return expression of rv8803_nvram_write
  2020-09-21  8:24 [PATCH -next] rtc: rv8803: simplify the return expression of rv8803_nvram_write Liu Shixin
@ 2020-09-29 20:20 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2020-09-29 20:20 UTC (permalink / raw)
  To: Liu Shixin, Alessandro Zummo; +Cc: Alexandre Belloni, linux-kernel, linux-rtc

On Mon, 21 Sep 2020 16:24:49 +0800, Liu Shixin wrote:
> Simplify the return expression.

Applied, thanks!

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

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-29 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  8:24 [PATCH -next] rtc: rv8803: simplify the return expression of rv8803_nvram_write Liu Shixin
2020-09-29 20:20 ` Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.