mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 15:42:46 +00:00
iwlwifi: mvm: return the actual error code when switch_vif_chanctx fails
We have code to recover and go back to the original channel context if something fails in the middle of switch_vif_chanctx, but we return the error code of the recover calls instead of the original code, so if the recovery succeeds, we will return 0 (success). Fix this by not assigning the return value of the recovery calls to ret. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
48a256e8ae
commit
6fd1fb63ab
1 changed files with 3 additions and 5 deletions
|
@ -2988,15 +2988,13 @@ iwl_mvm_switch_vif_chanctx_swap(struct iwl_mvm *mvm,
|
|||
__iwl_mvm_remove_chanctx(mvm, vifs[0].new_ctx);
|
||||
|
||||
out_reassign:
|
||||
ret = __iwl_mvm_add_chanctx(mvm, vifs[0].old_ctx);
|
||||
if (ret) {
|
||||
if (__iwl_mvm_add_chanctx(mvm, vifs[0].old_ctx)) {
|
||||
IWL_ERR(mvm, "failed to add old_ctx back after failure.\n");
|
||||
goto out_restart;
|
||||
}
|
||||
|
||||
ret = __iwl_mvm_assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].old_ctx,
|
||||
true);
|
||||
if (ret) {
|
||||
if (__iwl_mvm_assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].old_ctx,
|
||||
true)) {
|
||||
IWL_ERR(mvm, "failed to reassign old_ctx after failure.\n");
|
||||
goto out_restart;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue