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

Commit c05b6769 authored by Zhihao Cheng's avatar Zhihao Cheng Committed by Greg Kroah-Hartman
Browse files

i2c: qup: Fix error return code in qup_i2c_bam_schedule_desc()



commit e9acf0298c664f825e6f1158f2a97341bf9e03ca upstream.

Fix to return the error code from qup_i2c_change_state()
instaed of 0 in qup_i2c_bam_schedule_desc().

Fixes: fbf9921f ("i2c: qup: Fix error handling")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a6b17524
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -810,7 +810,8 @@ static int qup_i2c_bam_do_xfer(struct qup_i2c_dev *qup, struct i2c_msg *msg,
	if (ret || qup->bus_err || qup->qup_err) {
		reinit_completion(&qup->xfer);

		if (qup_i2c_change_state(qup, QUP_RUN_STATE)) {
		ret = qup_i2c_change_state(qup, QUP_RUN_STATE);
		if (ret) {
			dev_err(qup->dev, "change to run state timed out");
			goto desc_err;
		}