i2c: fix i2c-sh_mobile rx underrun
Subsystems (3)
PATCH 1/1 i2c: fix i2c-sh_mobile rx underrun
From: Magnus Damm <[email protected]>
Fix receive path underrun in i2c-sh_mobile driver.
Signed-off-by Magnus Damm <[email protected]>
---
Paul, can you include this with your other SuperH changes for 2.6.28?
drivers/i2c/busses/i2c-sh_mobile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-sh_mobile.c +2 -1
@@ -318,7 +318,8 @@ static int sh_mobile_i2c_isr_rx(struct s }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++;