diff mbox series

[v1,1/5] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success

Message ID 20171103015816.16972-1-troy.kisky@boundarydevices.com
State Accepted
Headers show
Series [v1,1/5] rtc: m41t80: m41t80_sqw_set_rate should return 0 on success | expand

Commit Message

Troy Kisky Nov. 3, 2017, 1:58 a.m. UTC
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(-)

Comments

Alexandre Belloni Nov. 8, 2017, 2:13 a.m. UTC | #1
On 02/11/2017 at 18:58:12 -0700, Troy Kisky wrote:
> 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(-)
> 

All applied, thanks.
diff mbox series

Patch

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)