When an i2c transfer is successful, an incorrect value may be returned. This patch fixes that. Signed-off-by: David Jenkins <davej at artesyncp.com> Signed-off-by: Mark A. Greer <mgreer at mvista.com> -- diff -Nur linux-2.6.13-mm1/drivers/i2c/busses/i2c-mv64xxx.c linux-2.6.13-mm1-mag/drivers/i2c/busses/i2c-mv64xxx.c --- linux-2.6.13-mm1/drivers/i2c/busses/i2c-mv64xxx.c 2005-09-01 16:26:21.000000000 -0700 +++ linux-2.6.13-mm1-mag/drivers/i2c/busses/i2c-mv64xxx.c 2005-09-01 17:00:58.000000000 -0700 @@ -429,7 +429,7 @@ if ((rc = mv64xxx_i2c_execute_msg(drv_data, &msgs[i])) != 0) break; - return rc; + return (rc < 0) ? rc : num; } static struct i2c_algorithm mv64xxx_i2c_algo = {