tree 292f29b437f14c9af06ac276be48004ec1df8460 parent 8e14d6c173f8fff05a94e62669c87c26141766af author Jean Delvare <[EMAIL PROTECTED]> Fri, 02 Sep 2005 21:25:47 +0200 committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Mon, 05 Sep 2005 23:26:53 -0700
[PATCH] i2c: bug fix for busses/i2c-mv64xxx.c When an i2c transfer is successful, an incorrect value is returned. This patch fixes that. Signed-off-by: Jean Delvare <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/i2c/busses/i2c-mv64xxx.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c --- a/drivers/i2c/busses/i2c-mv64xxx.c +++ b/drivers/i2c/busses/i2c-mv64xxx.c @@ -423,13 +423,13 @@ static int mv64xxx_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num) { struct mv64xxx_i2c_data *drv_data = i2c_get_adapdata(adap); - int i, rc = 0; + int i, rc; for (i=0; i<num; i++) - if ((rc = mv64xxx_i2c_execute_msg(drv_data, &msgs[i])) != 0) - break; + if ((rc = mv64xxx_i2c_execute_msg(drv_data, &msgs[i])) < 0) + return rc; - return rc; + return num; } static struct i2c_algorithm mv64xxx_i2c_algo = { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html