4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Troy Kisky <troy.ki...@boundarydevices.com>

commit de6042d2fa8afe22b76e3c68fd6e9584c9415a3b upstream.

Previously it was returning -EINVAL upon success.

Signed-off-by: Troy Kisky <troy.ki...@boundarydevices.com>
Signed-off-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>
Cc: Christoph Fritz <chf.fr...@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

---
 drivers/rtc/rtc-m41t80.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/rtc/rtc-m41t80.c
+++ b/drivers/rtc/rtc-m41t80.c
@@ -510,10 +510,7 @@ static int m41t80_sqw_set_rate(struct cl
        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)


Reply via email to