Commit 7d8ccf4f authored by Wang Yufen's avatar Wang Yufen Committed by Wolfram Sang

i2c: qcom-geni: fix error return code in geni_i2c_gpi_xfer

Fix to return a negative error code from the gi2c->err instead of
0.

Fixes: d8703554 ("i2c: qcom-geni: Add support for GPI DMA")
Signed-off-by: default avatarWang Yufen <wangyufen@huawei.com>
Reviewed-by: default avatarTommaso Merciai <tommaso.merciai@amarulasoluitons.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 8bfd4ec7
......@@ -626,7 +626,6 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
dev_err(gi2c->se.dev, "I2C timeout gpi flags:%d addr:0x%x\n",
gi2c->cur->flags, gi2c->cur->addr);
gi2c->err = -ETIMEDOUT;
goto err;
}
if (gi2c->err) {
......
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