From: Miri Korenblit Date: Wed, 27 May 2026 20:05:01 +0000 (+0300) Subject: wifi: iwlwifi: mld: fix smatch warning X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be443355dafcd4ab40f59b399868b04cc1e9da78;p=thirdparty%2Fkernel%2Fstable.git wifi: iwlwifi: mld: fix smatch warning We dereference the mld_sta pointer before checking for NULL. But we do check the sta pointer, and sta != NULL means mld_sta != NULL, so there is no real issue. Fix it anyway to silence the warning. Link: https://patch.msgid.link/20260527200512.506707-2-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit --- diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tx.c b/drivers/net/wireless/intel/iwlwifi/mld/tx.c index 1e8716cbb4ce..2185dade95f8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/tx.c @@ -563,7 +563,8 @@ iwl_mld_fill_tx_cmd(struct iwl_mld *mld, struct sk_buff *skb, * - when no sta is given. * - frames that are sent to an NMI sta, which is only used for management. */ - if (unlikely(!sta || mld_sta->vif->type == NL80211_IFTYPE_NAN || + if (unlikely(!sta || + (mld_sta && mld_sta->vif->type == NL80211_IFTYPE_NAN) || info->control.flags & IEEE80211_TX_CTRL_RATE_INJECT)) { flags |= IWL_TX_FLAGS_CMD_RATE; rate_n_flags = iwl_mld_get_tx_rate_n_flags(mld, info, sta,