Skip to content

Commit

Permalink
mac80211: remove pointless 'params' NULL checks
Browse files Browse the repository at this point in the history
These checks aren't necessary, cfg80211 never passes NULL.
Some static checkers complain about the missing checks on
the next line, but really the NULL checks are unnecessary.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Sep 5, 2018
1 parent 80aaa9c commit 6f52728
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
if (ret)
return ret;

if (type == NL80211_IFTYPE_AP_VLAN &&
params && params->use_4addr == 0) {
if (type == NL80211_IFTYPE_AP_VLAN && params->use_4addr == 0) {
RCU_INIT_POINTER(sdata->u.vlan.sta, NULL);
ieee80211_check_fast_rx_iface(sdata);
} else if (type == NL80211_IFTYPE_STATION &&
params && params->use_4addr >= 0) {
} else if (type == NL80211_IFTYPE_STATION && params->use_4addr >= 0) {
sdata->u.mgd.use_4addr = params->use_4addr;
}

Expand Down

0 comments on commit 6f52728

Please sign in to comment.