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>
This commit is contained in:
Manish Chopra 2014-01-10 11:48:57 -05:00 committed by David S. Miller
parent a04315893d
commit 6e1f586d31

View File

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