Skip to content

Commit

Permalink
rtc: m41t80: m41t80_sqw_set_rate should return 0 on success
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tkisky authored and alexandrebelloni committed Nov 8, 2017
1 parent a9687aa commit de6042d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de6042d

Please sign in to comment.