Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;