iwlwifi: mvm: unconditionally stop device after init
authorJohannes Berg <johannes.berg@intel.com>
Wed, 31 May 2017 12:14:51 +0000 (14:14 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 10:26:26 +0000 (13:26 +0300)
In commit b93b1fe3b532 ("iwlwifi: mvm: fix init_dbg flow to work
as expected"), the code was changed to make the stop conditional
on not having failed (and on not having init_dbg), which doesn't
make sense - we should stop the device regardless of failures.

Failure to do so is leading to the device being enabled when it
shouldn't be, and - if it gets re-enabled later - the new context
info code gets confused as paging data wasn't freed.

Remove the invalid error condition again.

Fixes: b93b1fe3b532 ("iwlwifi: mvm: fix init_dbg flow to work as expected")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index a0907762b0bf39ba18ea641ff0e11484f8ed7750..c1ce92f5306dec05e5229480ca69b523a4e76433 100644 (file)
@@ -741,7 +741,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
        mutex_lock(&mvm->mutex);
        iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
        err = iwl_run_init_mvm_ucode(mvm, true);
-       if (!err || !iwlmvm_mod_params.init_dbg)
+       if (!iwlmvm_mod_params.init_dbg)
                iwl_mvm_stop_device(mvm);
        iwl_mvm_unref(mvm, IWL_MVM_REF_INIT_UCODE);
        mutex_unlock(&mvm->mutex);