i2c: diolan-u2c: Fix master_xfer return code
authorGuenter Roeck <linux@roeck-us.net>
Thu, 9 Aug 2012 15:47:20 +0000 (08:47 -0700)
committerWolfram Sang <w.sang@pengutronix.de>
Sat, 18 Aug 2012 10:27:27 +0000 (12:27 +0200)
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>
drivers/i2c/busses/i2c-diolan-u2c.c

index aedb94f34bf748c1e82846f817264c1f73b2e602..dae3ddfe7619cf69899d974992ea0e7b43264b59 100644 (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)