diff options
author | Eytan Lifshitz <eytan.lifshitz@intel.com> | 2014-07-21 12:18:41 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-07-21 14:04:27 (GMT) |
commit | 60e83deb4c1e7e8b6ab78e7331288bf4211bdeb6 (patch) | |
tree | 2ee5bbc0a22f447b2ca3983723d6f1f089ac262c /net/mac80211 | |
parent | aeb136c5b433377324f030b1a50b96eb7a99193b (diff) | |
download | linux-60e83deb4c1e7e8b6ab78e7331288bf4211bdeb6.tar.xz |
mac80211: remove useless NULL checks
sdata can't be NULL, and key being NULL is really not possible
unless the code is modified.
The sdata check made a static analyze (klocwork) unhappy because
we would get pointer to local (sdata->local) and only then check
if sdata is non-NULL.
Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[remove !key check as well]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/key.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 16d97f0..d808cff 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -482,9 +482,6 @@ int ieee80211_key_link(struct ieee80211_key *key, int idx, ret; bool pairwise; - if (WARN_ON(!sdata || !key)) - return -EINVAL; - pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; idx = key->conf.keyidx; key->local = sdata->local; |