projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
185aed7
)
i2c: fix i2c-sh_mobile rx underrun
author
Magnus Damm
<damm@igel.co.jp>
Thu, 13 Nov 2008 06:28:21 +0000
(15:28 +0900)
committer
Paul Mundt
<lethal@linux-sh.org>
Thu, 13 Nov 2008 06:37:07 +0000
(15:37 +0900)
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>
drivers/i2c/busses/i2c-sh_mobile.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/i2c/busses/i2c-sh_mobile.c
b/drivers/i2c/busses/i2c-sh_mobile.c
index 640cbb237328196b1b3b22a91fea4b9ee42bf3b1..3384a717fec0d1d864eff63d8d0c798d7edd47cc 100644
(file)
--- a/
drivers/i2c/busses/i2c-sh_mobile.c
+++ b/
drivers/i2c/busses/i2c-sh_mobile.c
@@
-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++;