From: Guenter Roeck Date: Thu, 9 Aug 2012 15:47:20 +0000 (-0700) Subject: i2c: diolan-u2c: Fix master_xfer return code X-Git-Tag: upstream/snapshot3+hdmi~6785^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab5625c30a0a3c8a8491b641c939575c84bc0dbb;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 aedb94f..dae3ddf 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)