]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qlcnic: fix a timeout loop
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Dec 2015 13:56:16 +0000 (16:56 +0300)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 8 Jul 2016 18:31:19 +0000 (11:31 -0700)
commit662e34d1d0e7deaf585e217ba5df60602ec2dddd
treeabbe7acb73eb164e48eb5fff7e2d4fb725c87fcc
parentb575b6352379c8802382fa9389eecb03caec9aa2
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: 486a5bc77a4a ('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>
Orabug: 23711389
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c