Skip to content

Commit

Permalink
i2c: fix i2c-sh_mobile rx underrun
Browse files Browse the repository at this point in the history
Fix receive path underrun in i2c-sh_mobile driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Nov 13, 2008
1 parent 185aed7 commit bff4056
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-sh_mobile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit bff4056

Please sign in to comment.