Commit de6042d2 authored by Troy Kisky's avatar Troy Kisky Committed by Alexandre Belloni

rtc: m41t80: m41t80_sqw_set_rate should return 0 on success

Previously it was returning -EINVAL upon success.
Signed-off-by: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent a9687aa2
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment