summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-08-09 19:47:20 +0400
committerWolfram Sang <w.sang@pengutronix.de>2012-08-18 14:27:27 +0400
commitab5625c30a0a3c8a8491b641c939575c84bc0dbb (patch)
tree63af1f4e88174d37a1d70239d7a40cd6ed46bc5a /drivers
parent33ec5e818b7b0d0d02864a9586050c6f9a6a8b98 (diff)
downloadlinux-ab5625c30a0a3c8a8491b641c939575c84bc0dbb.tar.xz
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')
-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,
}
}
}
+ ret = num;
abort:
sret = diolan_i2c_stop(dev);
if (sret < 0 && ret >= 0)