]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: fix a timeout loop
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Dec 2015 13:56:16 +0000 (16:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 18:11:05 +0000 (13:11 -0500)
commit72042e8cc2c5c37cd250374ed70ad0a043f68d9c
tree8f5de9d64c1b5c2b5db94774ddd9c0b586cee172
parent6fbaa5a0d82a13c24f3978825d9b974765e5b59c
qlcnic: fix a timeout loop

The problem here is that at the end of the loop we test for if
idc->vnic_wait_limit is zero, but since idc->vnic_wait_limit-- is a
post-op, it actually ends up set to (u8)-1.  I have fixed this by
moving the decrement inside the loop.

Fixes: 63e06de3dd88 ('qlcnic: Add support for 83xx suspend and resume.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c