Skip to content

Commit 3f497de

Browse files
committed
iwlwifi: mvm: initialize status in iwl_mvm_add_int_sta_common()
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: 732d06e ("iwlwifi: mvm: add station before allocating a queue") Reported by: Dan Carpenter <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
1 parent 61e7d91 commit 3f497de

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+1
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ static int iwl_mvm_add_int_sta_common(struct iwl_mvm *mvm,
12851285
{
12861286
struct iwl_mvm_add_sta_cmd cmd;
12871287
int ret;
1288-
u32 status;
1288+
u32 status = ADD_STA_SUCCESS;
12891289

12901290
lockdep_assert_held(&mvm->mutex);
12911291

0 commit comments

Comments
 (0)