All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/5] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success
@ 2017-11-03  1:58 Troy Kisky
  2017-11-03  1:58 ` [PATCH v1 2/5] rtc: m41t80: fix m41t80_sqw_round_rate return value Troy Kisky
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Troy Kisky @ 2017-11-03  1:58 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: gary.bisson, linux-rtc, Troy Kisky

Previously it was returning -EINVAL upon success.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 drivers/rtc/rtc-m41t80.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c
index f4c070ea8384..8f5843169dc2 100644
--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -510,10 +510,7 @@ static int m41t80_sqw_set_rate(struct clk_hw *hw, unsigned long rate,
 	reg = (reg & 0x0f) | (val << 4);
 
 	ret = i2c_smbus_write_byte_data(client, reg_sqw, reg);
-	if (ret < 0)
-		return ret;
-
-	return -EINVAL;
+	return ret;
 }
 
 static int m41t80_sqw_control(struct clk_hw *hw, bool enable)
-- 
2.11.0

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

end of thread, other threads:[~2017-11-08  2:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03  1:58 [PATCH v1 1/5] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success Troy Kisky
2017-11-03  1:58 ` [PATCH v1 2/5] rtc: m41t80: fix m41t80_sqw_round_rate return value Troy Kisky
2017-11-03  1:58 ` [PATCH v1 3/5] rtc: m41t80: avoid i2c read in m41t80_sqw_recalc_rate Troy Kisky
2017-11-03  1:58 ` [PATCH v1 4/5] rtc: m41t80: avoid i2c read in m41t80_sqw_is_prepared Troy Kisky
2017-11-03  1:58 ` [PATCH v1 5/5] rtc: m41t80: remove unneeded checks from m41t80_sqw_set_rate Troy Kisky
2017-11-08  2:13 ` [PATCH v1 1/5] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success 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.