diff options
| author | Sricharan R <sricharan@codeaurora.org> | 2016-06-10 23:38:20 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-10 12:54:49 +0200 |
| commit | f5be1dff829038ff2225238291c67fdeb7caa0c9 (patch) | |
| tree | ab495ec63dc152207406164eab8569f3a1b8ed2a | |
| parent | 9388174e5d878444e78103f9e97e656a463bc5e4 (diff) | |
i2c: qup: Fix wrong value of index variable
commit d4f56c7773483b8829e89cfc739b7a5a071f6da0 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -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 23eaabb19f96..a5eb09c5539f 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; |
