Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56073ba4 authored by Troy Kisky's avatar Troy Kisky Committed by Greg Kroah-Hartman
Browse files

rtc: m41t80: m41t80_sqw_set_rate should return 0 on success



commit de6042d2fa8afe22b76e3c68fd6e9584c9415a3b upstream.

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>
Cc: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d01ac8c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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;
}

static int m41t80_sqw_control(struct clk_hw *hw, bool enable)