Skip to content

Commit 3358a5c

Browse files
Dan Carpenterdavem330
Dan Carpenter
authored andcommitted
qlcnic: fix a loop exit condition better
In the original code, if we succeeded on the last iteration through the loop then we still returned failure. Fixes: 389e4e0 ('qlcnic: fix a timeout loop') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 1dfddff commit 3358a5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter)
252252
state = QLCRDX(ahw, QLC_83XX_VNIC_STATE);
253253
}
254254

255-
if (!idc->vnic_wait_limit) {
255+
if (state != QLCNIC_DEV_NPAR_OPER) {
256256
dev_err(&adapter->pdev->dev,
257257
"vNIC mode not operational, state check timed out.\n");
258258
return -EIO;

0 commit comments

Comments
 (0)