summaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-qup.c
diff options
context:
space:
mode:
authorSricharan R <sricharan@codeaurora.org>2016-06-10 21:08:20 +0300
committerWolfram Sang <wsa@the-dreams.de>2016-06-18 19:33:13 +0300
commitd4f56c7773483b8829e89cfc739b7a5a071f6da0 (patch)
tree26b51620ec6c87967fd77a3372d0a6b25c3f2dba /drivers/i2c/busses/i2c-qup.c
parent5edb56491d4812c42175980759da53388e5d86f5 (diff)
downloadlinux-d4f56c7773483b8829e89cfc739b7a5a071f6da0.tar.xz
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;