After the loop we test "if (!retry)" to see if we timedout. The problem
is "retry--" is a post-op so retry will be -1 at the end of the loop. I
have fixed this by changing it to a pre-op instead.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rings have been re-assigned.
*/
mic_send_intr(mvdev->mdev, mvdev->c2h_vdev_db);
- for (retry = 100; retry--;) {
+ for (retry = 100; --retry;) {
if (!ioread8(&dc->used_address_updated))
break;
msleep(100);