Commit 3358a5c0 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: 389e4e04 ('qlcnic: fix a timeout loop')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1dfddff5
...@@ -252,7 +252,7 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter) ...@@ -252,7 +252,7 @@ int qlcnic_83xx_check_vnic_state(struct qlcnic_adapter *adapter)
state = QLCRDX(ahw, QLC_83XX_VNIC_STATE); state = QLCRDX(ahw, QLC_83XX_VNIC_STATE);
} }
if (!idc->vnic_wait_limit) { if (state != QLCNIC_DEV_NPAR_OPER) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"vNIC mode not operational, state check timed out.\n"); "vNIC mode not operational, state check timed out.\n");
return -EIO; return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment