mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-10 20:38:50 -04:00
wifi: iwlwifi: mld: inform trans on init failure
If starting the op mode failed, the opmode memory is being freed, so trans->op_mode needs to be NULLified. Otherwise, trans will access already freed memory. Call iwl_trans_op_mode_leave in that case. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Link: https://patch.msgid.link/20250423091408.c7e178748ef7.Ifaf15bdd8ef8c59e04effbd2e7aa0034b30eeacb@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
b68df31ce6
commit
092d41f13d
@@ -425,7 +425,7 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
if (ret) {
|
||||
wiphy_unlock(mld->wiphy);
|
||||
rtnl_unlock();
|
||||
goto free_hw;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* We are about to stop the FW. Notifications may require an
|
||||
@@ -471,7 +471,8 @@ iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
iwl_mld_leds_exit(mld);
|
||||
free_nvm:
|
||||
kfree(mld->nvm_data);
|
||||
free_hw:
|
||||
err:
|
||||
iwl_trans_op_mode_leave(mld->trans);
|
||||
ieee80211_free_hw(mld->hw);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user