qlcnic: Fix SR-IOV cleanup code path
authorManish Chopra <manish.chopra@qlogic.com>
Fri, 10 Jan 2014 16:48:57 +0000 (11:48 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jan 2014 23:31:19 +0000 (15:31 -0800)
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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c

index bf8fca7d874f12b897ac36c159fbdb4905ec8de3..f998fdcd7551b5f9796be5aa7fba4140d8c0bb87 100644 (file)
@@ -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);