diff options
author | Sricharan R <[email protected]> | 2016-06-10 23:38:20 +0530 |
---|---|---|
committer | Wolfram Sang <[email protected]> | 2016-06-18 18:33:13 +0200 |
commit | d4f56c7773483b8829e89cfc739b7a5a071f6da0 (patch) | |
tree | 26b51620ec6c87967fd77a3372d0a6b25c3f2dba | |
parent | 5edb56491d4812c42175980759da53388e5d86f5 (diff) |
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 <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
-rw-r--r-- | drivers/i2c/busses/i2c-qup.c | 2 |
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; |