Commit 6f527287 authored by Johannes Berg's avatar Johannes Berg

mac80211: remove pointless 'params' NULL checks

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: default avatarJohannes Berg <johannes.berg@intel.com>
parent 80aaa9c1
...@@ -158,12 +158,10 @@ static int ieee80211_change_iface(struct wiphy *wiphy, ...@@ -158,12 +158,10 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
if (ret) if (ret)
return ret; return ret;
if (type == NL80211_IFTYPE_AP_VLAN && if (type == NL80211_IFTYPE_AP_VLAN && params->use_4addr == 0) {
params && params->use_4addr == 0) {
RCU_INIT_POINTER(sdata->u.vlan.sta, NULL); RCU_INIT_POINTER(sdata->u.vlan.sta, NULL);
ieee80211_check_fast_rx_iface(sdata); ieee80211_check_fast_rx_iface(sdata);
} else if (type == NL80211_IFTYPE_STATION && } else if (type == NL80211_IFTYPE_STATION && params->use_4addr >= 0) {
params && params->use_4addr >= 0) {
sdata->u.mgd.use_4addr = params->use_4addr; sdata->u.mgd.use_4addr = params->use_4addr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment