summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorManish Chopra <manish.chopra@qlogic.com>2014-01-10 11:48:57 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-13 15:31:19 -0800
commit6e1f586d31ad49063da391db12632b31c7b00d76 (patch)
tree53a5e7249d1022674ce96f9f104dd840f33c1da5 /drivers/net/ethernet
parenta04315893db0dbdf490e2d284d3aef0f01762b54 (diff)
downloadlinux-6e1f586d31ad49063da391db12632b31c7b00d76.tar.bz2
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index bf8fca7d874f..f998fdcd7551 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/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);