]> Git Repo - linux.git/commitdiff
iwlwifi: mvm: initialize status in iwl_mvm_add_int_sta_common()
authorLuca Coelho <[email protected]>
Sat, 2 Sep 2017 08:05:22 +0000 (11:05 +0300)
committerLuca Coelho <[email protected]>
Fri, 8 Sep 2017 08:49:15 +0000 (11:49 +0300)
We always need to initialize the status argument to the success case
before calling iwl_mvm_send_cmd_status() or
iwl_mvm_send_cmd_pdu_status() (which calls the former) otherwise we
may get an uninitialized value back.  In this case, we use
ADD_STA_SUCCESS as success.

Fixes: 732d06e9d9cf ("iwlwifi: mvm: add station before allocating a queue")
Reported by: Dan Carpenter <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index 2dafe9bb4d8b91ca6a5a3a295cb0a34851b73108..c4a343534c5ead89793b6375660cb9238aeb86ed 100644 (file)
@@ -1285,7 +1285,7 @@ static int iwl_mvm_add_int_sta_common(struct iwl_mvm *mvm,
 {
        struct iwl_mvm_add_sta_cmd cmd;
        int ret;
-       u32 status;
+       u32 status = ADD_STA_SUCCESS;
 
        lockdep_assert_held(&mvm->mutex);
 
This page took 0.061889 seconds and 4 git commands to generate.