Browse Source

qlcnic: Fix SR-IOV cleanup code path

o Add __QLCNIC_SRIOV_ENABLE bit check before doing SRIOV cleanup

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Manish Chopra 11 years ago
parent
commit
6e1f586d31
1 changed files with 1 additions and 3 deletions
  1. 1 3
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c

+ 1 - 3
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c

@@ -277,9 +277,7 @@ static void qlcnic_sriov_vf_cleanup(struct qlcnic_adapter *adapter)
 
 void qlcnic_sriov_cleanup(struct qlcnic_adapter *adapter)
 {
-	struct qlcnic_sriov *sriov = adapter->ahw->sriov;
-
-	if (!sriov)
+	if (!test_bit(__QLCNIC_SRIOV_ENABLE, &adapter->state))
 		return;
 
 	qlcnic_sriov_free_vlans(adapter);