summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-08-09 17:47:20 +0200
committerWolfram Sang <w.sang@pengutronix.de>2012-08-18 12:27:27 +0200
commitab5625c30a0a3c8a8491b641c939575c84bc0dbb (patch)
tree63af1f4e88174d37a1d70239d7a40cd6ed46bc5a
parentI2C: OMAP: xfer: fix runtime PM get/put balance on error (diff)
downloadlinux-ab5625c30a0a3c8a8491b641c939575c84bc0dbb.tar.xz
linux-ab5625c30a0a3c8a8491b641c939575c84bc0dbb.zip
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>
-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)