提交 bff4056c 编写于 作者: M Magnus Damm 提交者: Paul Mundt

i2c: fix i2c-sh_mobile rx underrun

Fix receive path underrun in i2c-sh_mobile driver.
Signed-off-by: NMagnus Damm <damm@igel.co.jp>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 185aed75
......@@ -318,7 +318,8 @@ static int sh_mobile_i2c_isr_rx(struct sh_mobile_i2c_data *pd)
} else
data = i2c_op(pd, OP_RX, 0);
pd->msg->buf[real_pos] = data;
if (real_pos >= 0)
pd->msg->buf[real_pos] = data;
} while (0);
pd->pos++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册