From: Alan Stern <stern@rowland.harvard.edu>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: oneukum@suse.com, <gregkh@linuxfoundation.org>,
<linux-usb@vger.kernel.org>,
<usb-storage@lists.one-eyed-alien.net>,
<linux-kernel@vger.kernel.org>,
Peter Senna Tschudin <peter.senna@gmail.com>
Subject: Re: [usb-storage] [PATCH] usb: storage: add missing pre-increment to variable
Date: Wed, 15 Feb 2017 10:26:10 -0500 (EST) [thread overview]
Message-ID: <Pine.LNX.4.44L0.1702151025350.2173-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20170215073919.GA2356@embeddedgus>
On Wed, 15 Feb 2017, Gustavo A. R. Silva wrote:
> Add missing pre-increment to 'waitcount' variable used in do-while loop.
>
> Addresses-Coverity-ID: 1011631
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> drivers/usb/storage/jumpshot.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
> index 011e527..a26c4bb 100644
> --- a/drivers/usb/storage/jumpshot.c
> +++ b/drivers/usb/storage/jumpshot.c
> @@ -313,7 +313,7 @@ static int jumpshot_write_data(struct us_data *us,
> //
> msleep(50);
> }
> - } while ((result != USB_STOR_TRANSPORT_GOOD) && (waitcount < 10));
> + } while ((result != USB_STOR_TRANSPORT_GOOD) && (++waitcount < 10));
>
> if (result != USB_STOR_TRANSPORT_GOOD)
> usb_stor_dbg(us, "Gah! Waitcount = 10. Bad write!?\n");
>
This has already been reported and fixed. See
http://marc.info/?l=linux-usb&m=148604164024557&w=2
Alan Stern
next prev parent reply other threads:[~2017-02-15 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 5:06 usb: storage: suspicious code Gustavo A. R. Silva
2017-02-15 7:01 ` [usb-storage] " Oliver Neukum
2017-02-15 7:14 ` Gustavo A. R. Silva
2017-02-15 7:39 ` [PATCH] usb: storage: add missing pre-increment to variable Gustavo A. R. Silva
2017-02-15 15:26 ` Alan Stern [this message]
2017-02-20 23:07 ` [usb-storage] " Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44L0.1702151025350.2173-100000@iolanthe.rowland.org \
--to=stern@rowland.harvard.edu \
--cc=garsilva@embeddedor.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=peter.senna@gmail.com \
--cc=usb-storage@lists.one-eyed-alien.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.