summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-12-15 12:03:24 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-12-18 15:14:58 +0300
commit554be8333088e4a40f4b522c2b36ab23fb22f4be (patch)
tree439a66b8a07fd4e0f58b38c9ff16b64713d73767 /net/mac80211/cfg.c
parent3453de98145fa1a9453d18a42406bb7a47bec269 (diff)
downloadlinux-554be8333088e4a40f4b522c2b36ab23fb22f4be.tar.xz
mac80211: ftm responder: remove pointless defensive coding
The pointer and corresponding length is always set in pairs in cfg80211, so no need to have this strange defensive check that also confuses static checkers. Clean it up. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index cf8f946ae724..567c63ff830f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -800,8 +800,8 @@ static int ieee80211_set_ftm_responder_params(
u8 *pos;
int len;
- if ((!lci || !lci_len) && (!civicloc || !civicloc_len))
- return 1;
+ if (!lci_len && !civicloc_len)
+ return 0;
bss_conf = &sdata->vif.bss_conf;
old = bss_conf->ftmr_params;