From: Manish Chopra Date: Fri, 10 Jan 2014 16:48:57 +0000 (-0500) Subject: qlcnic: Fix SR-IOV cleanup code path X-Git-Tag: v4.0~2533^2~205^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e1f586d31ad49063da391db12632b31c7b00d76;p=platform%2Fkernel%2Flinux-amlogic.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 bf8fca7..f998fdc 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);