From: Manish Chopra Date: Fri, 10 Jan 2014 16:48:57 +0000 (-0500) Subject: qlcnic: Fix SR-IOV cleanup code path X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6e1f586d31ad49063da391db12632b31c7b00d76;p=linux-beck.git qlcnic: Fix SR-IOV cleanup code path o Add __QLCNIC_SRIOV_ENABLE bit check before doing SRIOV cleanup Signed-off-by: Manish Chopra Signed-off-by: David S. Miller --- 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);