Commit 87fc0302 authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: pcie: make ctxt-info free idempotent

By setting the pointers to NULL at the end, these functions
are made idempotent.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 3b37f4c9
...@@ -103,6 +103,7 @@ static void iwl_pcie_ctxt_info_free_fw_img(struct iwl_trans *trans) ...@@ -103,6 +103,7 @@ static void iwl_pcie_ctxt_info_free_fw_img(struct iwl_trans *trans)
kfree(dram->fw); kfree(dram->fw);
dram->fw_cnt = 0; dram->fw_cnt = 0;
dram->fw = NULL;
} }
void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans) void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans)
...@@ -124,6 +125,7 @@ void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans) ...@@ -124,6 +125,7 @@ void iwl_pcie_ctxt_info_free_paging(struct iwl_trans *trans)
kfree(dram->paging); kfree(dram->paging);
dram->paging_cnt = 0; dram->paging_cnt = 0;
dram->paging = NULL;
} }
static int iwl_pcie_ctxt_info_init_fw_sec(struct iwl_trans *trans, static int iwl_pcie_ctxt_info_init_fw_sec(struct iwl_trans *trans,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment