i2c: diolan-u2c: Fix master_xfer return code

The master_xfer function returns 0 on success. It should return the number of
successful transactions.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
This commit is contained in:
Guenter Roeck 2012-08-09 08:47:20 -07:00 committed by Wolfram Sang
parent 33ec5e818b
commit ab5625c30a
1 changed files with 1 additions and 0 deletions

View File

@ -405,6 +405,7 @@ static int diolan_usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
}
}
}
ret = num;
abort:
sret = diolan_i2c_stop(dev);
if (sret < 0 && ret >= 0)