提交 8ae653dc 编写于 作者: M Masahisa Kojima 提交者: Xie XiuQi

i2c: synquacer: fix synquacer_i2c_doxfer() return value

commit ff937890 upstream.

master_xfer should return the number of messages successfully
processed.

Fixes: 0d676a6c ("i2c: add support for Socionext SynQuacer I2C controller")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: NOkamoto Satoru <okamoto.satoru@socionext.com>
Signed-off-by: NMasahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 57a94954
...@@ -356,7 +356,7 @@ static int synquacer_i2c_doxfer(struct synquacer_i2c *i2c, ...@@ -356,7 +356,7 @@ static int synquacer_i2c_doxfer(struct synquacer_i2c *i2c,
/* wait 2 clock periods to ensure the stop has been through the bus */ /* wait 2 clock periods to ensure the stop has been through the bus */
udelay(DIV_ROUND_UP(2 * 1000, i2c->speed_khz)); udelay(DIV_ROUND_UP(2 * 1000, i2c->speed_khz));
return 0; return ret;
} }
static irqreturn_t synquacer_i2c_isr(int irq, void *dev_id) static irqreturn_t synquacer_i2c_isr(int irq, void *dev_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册