Skip to content
Commit 30d17c12 authored by Takashi Iwai's avatar Takashi Iwai Committed by Luca Coelho
Browse files

iwlwifi: mvm: Don't call iwl_mvm_sta_from_mac80211() with NULL sta



The recent fix for NULL sta in iwl_mvm_get_tx_rate() still has a call
of iwl_mvm_sta_from_mac80211() that may be called with NULL sta.
Although this practically only points to the address and the actual
access doesn't happen due to the conditional evaluation at a later
point, it looks a bit flaky.

This patch drops the temporary variable above and evaluates
iwm_mvm_sta_from_mac80211() directly for avoiding confusions.

Fixes: d599f714 ("iwlwifi: mvm: don't crash on invalid rate w/o STA")
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220121114024.10454-1-tiwai@suse.de


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent ea0de861
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment