summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-qup.c
diff options
context:
space:
mode:
authorSricharan R <sricharan@codeaurora.org>2016-06-10 20:08:20 +0200
committerWolfram Sang <wsa@the-dreams.de>2016-06-18 18:33:13 +0200
commitd4f56c7773483b8829e89cfc739b7a5a071f6da0 (patch)
tree26b51620ec6c87967fd77a3372d0a6b25c3f2dba /drivers/i2c/busses/i2c-qup.c
parentLinux 4.7-rc3 (diff)
downloadlinux-d4f56c7773483b8829e89cfc739b7a5a071f6da0.tar.xz
linux-d4f56c7773483b8829e89cfc739b7a5a071f6da0.zip
i2c: qup: Fix wrong value of index variable
index gets incremented during check to determine if the messages can be transferred with dma. But not reset after that, resulting in wrong start value in subsequent loop, causing failure. Fix it. Signed-off-by: Sricharan R <sricharan@codeaurora.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
Diffstat (limited to 'drivers/i2c/busses/i2c-qup.c')
-rw-r--r--drivers/i2c/busses/i2c-qup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index cc6439ab3f71..041050edd809 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1268,6 +1268,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
}
}
+ idx = 0;
+
do {
if (msgs[idx].len == 0) {
ret = -EINVAL;