diff options
author | Peter Rosin <peda@axentia.se> | 2018-05-09 22:47:26 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2018-05-17 16:40:33 +0300 |
commit | 5e87270bec6d17d3b90e54976f53c9b221f79c1d (patch) | |
tree | 2779aec2e6c017e1d17e096e071da21638e33f41 /drivers/i2c | |
parent | 8e03477cb709b73a2c1e1f4349ee3b7b33c50416 (diff) | |
download | linux-5e87270bec6d17d3b90e54976f53c9b221f79c1d.tar.xz |
i2c: synquacer: fix fence-post error in retry loop
There is a difference between attempts and retries.
Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-synquacer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c index a021f866d8c2..915f5edbab33 100644 --- a/drivers/i2c/busses/i2c-synquacer.c +++ b/drivers/i2c/busses/i2c-synquacer.c @@ -509,7 +509,7 @@ static int synquacer_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, dev_dbg(i2c->dev, "calculated timeout %d ms\n", i2c->timeout_ms); - for (retry = 0; retry < adap->retries; retry++) { + for (retry = 0; retry <= adap->retries; retry++) { ret = synquacer_i2c_doxfer(i2c, msgs, num); if (ret != -EAGAIN) return ret; |