提交 6e1f586d 编写于 作者: M Manish Chopra 提交者: David S. Miller

qlcnic: Fix SR-IOV cleanup code path

o Add __QLCNIC_SRIOV_ENABLE bit check before doing SRIOV cleanup
Signed-off-by: NManish Chopra <manish.chopra@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a0431589
...@@ -277,9 +277,7 @@ static void qlcnic_sriov_vf_cleanup(struct qlcnic_adapter *adapter) ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册