Skip to content

Commit

Permalink
qlcnic: fix a loop exit condition better
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Dec 24, 2015
1 parent 1dfddff commit 3358a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter)
state = QLCRDX(ahw, QLC_83XX_VNIC_STATE);
}

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

0 comments on commit 3358a5c

Please sign in to comment.