From: Guenter Roeck Date: Thu, 9 Aug 2012 15:47:20 +0000 (-0700) Subject: i2c: diolan-u2c: Fix master_xfer return code X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ab5625c30a0a3c8a8491b641c939575c84bc0dbb;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c index aedb94f34bf7..dae3ddfe7619 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c @@ -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)