Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1458098 > unrolled thread

[PATCH 4.6 87/96] i2c: qup: Fix wrong value of index variable

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-08-08 21:30 +0200
Last post2016-08-08 21:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.6 87/96] i2c: qup: Fix wrong value of index variable Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-08-08 21:30 +0200

#1458098 — [PATCH 4.6 87/96] i2c: qup: Fix wrong value of index variable

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-08-08 21:30 +0200
Subject[PATCH 4.6 87/96] i2c: qup: Fix wrong value of index variable
Message-ID<s3Ypk-5wn-39@gated-at.bofh.it>
4.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sricharan R <sricharan@codeaurora.org>

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>

---
 drivers/i2c/busses/i2c-qup.c |    2 ++
 1 file changed, 2 insertions(+)

--- 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_ad
 		}
 	}
 
+	idx = 0;
+
 	do {
 		if (msgs[idx].len == 0) {
 			ret = -EINVAL;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web