From: Johannes Berg Date: Wed, 1 Mar 2023 10:09:30 +0000 (+0200) Subject: wifi: mac80211: mlme: remove pointless sta check X-Git-Tag: v6.6.7~2736^2~378^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15f9b3ef5190bacc8a39628bc57c6da085877ffe;p=platform%2Fkernel%2Flinux-starfive.git wifi: mac80211: mlme: remove pointless sta check We already exited the function if sta ended up NULL, so just remove the extra check. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230301115906.4cbac9cfd03a.I21ec81c96d246afdabc2b0807d3856e6b1182cb7@changeid Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index cdf842c..78adbac 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -5893,7 +5893,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link, goto free; } - if (sta && elems->opmode_notif) + if (elems->opmode_notif) ieee80211_vht_handle_opmode(sdata, link_sta, *elems->opmode_notif, rx_status->band);