lkml.org 
[lkml]   [2016]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 61/68] i2c: qup: Fix wrong value of index variable
    Date
    4.4-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
    @@ -435,6 +435,8 @@ static int qup_i2c_read_one(struct qup_i
    if (ret)
    goto err;

    + idx = 0;
    +
    do {
    left = wait_for_completion_timeout(&qup->xfer, HZ);
    if (!left) {

    \
     
     \ /
      Last update: 2016-08-08 22:01    [W:4.326 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site