summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m41t80.c
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2017-11-03 02:58:12 +0100
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-11-08 07:52:23 +0100
commitde6042d2fa8afe22b76e3c68fd6e9584c9415a3b (patch)
treeb892ff676c800222a9b7c875b9aa542d15dc1629 /drivers/rtc/rtc-m41t80.c
parentrtc: add support for NXP PCF85363 real-time clock (diff)
downloadlinux-de6042d2fa8afe22b76e3c68fd6e9584c9415a3b.tar.xz
linux-de6042d2fa8afe22b76e3c68fd6e9584c9415a3b.zip
rtc: m41t80: m41t80_sqw_set_rate should return 0 on success
Previously it was returning -EINVAL upon success. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
-rw-r--r--drivers/rtc/rtc-m41t80.c5
1 files changed, 1 insertions, 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)