All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: fix i2c-sh_mobile rx underrun
@ 2008-11-13  6:28 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2008-11-13  6:28 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@igel.co.jp>

Fix receive path underrun in i2c-sh_mobile driver. 

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 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(-)

--- 0001/drivers/i2c/busses/i2c-sh_mobile.c
+++ work/drivers/i2c/busses/i2c-sh_mobile.c	2008-11-11 19:22:49.000000000 +0900
@@ -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++;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-13  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-13  6:28 [PATCH] i2c: fix i2c-sh_mobile rx underrun Magnus Damm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.