提交 d1b2f0a9 编写于 作者: J Jean Delvare 提交者: Greg Kroah-Hartman

[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: NJean Delvare <khali@linux-fr.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8e14d6c1
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册