[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: qlcnic: fix a loop exit condition better
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2015-12-31 22:51:34
Message-ID: 20151231225134.4EF5B66129D () gitolite ! kernel ! org
[Download RAW message or body]
Web: https://git.kernel.org/torvalds/c/3358a5c0c1578fa215f90a0e750579cd6258ddd9
Commit: 3358a5c0c1578fa215f90a0e750579cd6258ddd9
Parent: 1dfddff5fcd869fcab0c52fafae099dfa435a935
Refname: refs/heads/master
Author: Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Thu Dec 24 12:21:22 2015 +0300
Committer: David S. Miller <davem@davemloft.net>
CommitDate: Thu Dec 24 11:02:35 2015 -0500
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: 389e4e04ad2d ('qlcnic: fix a timeout loop')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c \
b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c index b1a452f..3490675 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic