linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rtc: armada38x: drop redundant initialization
@ 2018-06-21 17:40 Baruch Siach
  2018-06-21 17:40 ` [PATCH 2/2] rtc: armada38x: reset after rtc power loss Baruch Siach
  2018-06-21 17:59 ` [PATCH 1/2] rtc: armada38x: drop redundant initialization Alexandre Belloni
  0 siblings, 2 replies; 6+ messages in thread
From: Baruch Siach @ 2018-06-21 17:40 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth
  Cc: Russell King, Jon Nettleton, Alessandro Zummo, Alexandre Belloni,
	linux-rtc, linux-arm-kernel, Baruch Siach

The 'ret' variable in these functions is set unconditionally below.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/rtc/rtc-armada38x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
index 1e4978c96ffd..4d62a54fd5d6 100644
--- a/drivers/rtc/rtc-armada38x.c
+++ b/drivers/rtc/rtc-armada38x.c
@@ -229,7 +229,7 @@ static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)
 static int armada38x_rtc_set_time(struct device *dev, struct rtc_time *tm)
 {
 	struct armada38x_rtc *rtc = dev_get_drvdata(dev);
-	int ret = 0;
+	int ret;
 	unsigned long time, flags;
 
 	ret = rtc_tm_to_time(tm, &time);
@@ -272,7 +272,7 @@ static int armada38x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
 	u32 reg = ALARM_REG(RTC_ALARM1, rtc->data->alarm);
 	u32 reg_irq = ALARM_REG(RTC_IRQ1_CONF, rtc->data->alarm);
 	unsigned long time, flags;
-	int ret = 0;
+	int ret;
 
 	ret = rtc_tm_to_time(&alrm->time, &time);
 
-- 
2.17.1

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

end of thread, other threads:[~2018-07-12 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-21 17:40 [PATCH 1/2] rtc: armada38x: drop redundant initialization Baruch Siach
2018-06-21 17:40 ` [PATCH 2/2] rtc: armada38x: reset after rtc power loss Baruch Siach
2018-06-28 13:56   ` Gregory CLEMENT
2018-07-12 18:36   ` Alexandre Belloni
2018-06-21 17:59 ` [PATCH 1/2] rtc: armada38x: drop redundant initialization Alexandre Belloni
2018-06-21 18:11   ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).