From: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
To: oneukum@suse.com, stern@rowland.harvard.edu, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
linux-kernel@vger.kernel.org,
Peter Senna Tschudin <peter.senna@gmail.com>,
"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: [PATCH] usb: storage: add missing pre-increment to variable
Date: Wed, 15 Feb 2017 01:39:19 -0600 [thread overview]
Message-ID: <20170215073919.GA2356@embeddedgus> (raw)
In-Reply-To: <20170215011453.Horde.ChQ7Vx50S54ARryadKU7q6c@gator4166.hostgator.com>
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");
--
2.5.0
next prev parent reply other threads:[~2017-02-15 8:03 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 ` Gustavo A. R. Silva [this message]
2017-02-15 15:26 ` [usb-storage] [PATCH] usb: storage: add missing pre-increment to variable Alan Stern
2017-02-20 23:07 ` 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=20170215073919.GA2356@embeddedgus \
--to=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=stern@rowland.harvard.edu \
--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.