Skip to content

Commit

Permalink
i2c: qup: Fix wrong value of index variable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Sricharan R authored and Wolfram Sang committed Jun 18, 2016
1 parent 5edb564 commit d4f56c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/i2c/busses/i2c-qup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,8 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
}
}

idx = 0;

do {
if (msgs[idx].len == 0) {
ret = -EINVAL;
Expand Down

0 comments on commit d4f56c7

Please sign in to comment.