summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-08-31 11:31:05 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-09-05 10:03:13 +0200
commit6f527287e0bbcb2d9a9f0580ac0c65786b9b9f0b (patch)
tree8e1a00239cc1967e5204673f33d1717a8d235601 /net/mac80211/cfg.c
parent80aaa9c1641590ab85c74824399cdb6b2e28e772 (diff)
downloadlinux-6f527287e0bbcb2d9a9f0580ac0c65786b9b9f0b.tar.bz2
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: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index da1b85de7930..1813c6f148bb 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -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;
}