[PATCH] usb: storage: add missing pre-increment to variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing pre-increment to 'waitcount' variable used in do-while loop.

Addresses-Coverity-ID: 1011631
Signed-off-by: Gustavo A. R. Silva <garsilva@xxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux