From: Johannes Berg Date: Sat, 15 Dec 2018 09:03:24 +0000 (+0200) Subject: mac80211: ftm responder: remove pointless defensive coding X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=554be8333088e4a40f4b522c2b36ab23fb22f4be;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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;