aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-08-09 11:47:20 -0400
committerWolfram Sang <w.sang@pengutronix.de>2012-08-18 06:27:27 -0400
commitab5625c30a0a3c8a8491b641c939575c84bc0dbb (patch)
tree63af1f4e88174d37a1d70239d7a40cd6ed46bc5a /drivers/i2c
parent33ec5e818b7b0d0d02864a9586050c6f9a6a8b98 (diff)
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-diolan-u2c.c1
1 files changed, 1 insertions, 0 deletions
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,
405 } 405 }
406 } 406 }
407 } 407 }
408 ret = num;
408abort: 409abort:
409 sret = diolan_i2c_stop(dev); 410 sret = diolan_i2c_stop(dev);
410 if (sret < 0 && ret >= 0) 411 if (sret < 0 && ret >= 0)