Commit 753a9a72 authored by Luca Coelho's avatar Luca Coelho Committed by Johannes Berg

mac80211: don't check if key is NULL in ieee80211_key_link()

We already assume that key is not NULL and dereference it in a few
other places before we check whether it is NULL, so the check is
unnecessary.  Remove it.

Fixes: 96fc6efb ("mac80211: IEEE 802.11 Extended Key ID support")
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/20190830112451.21655-8-luca@coelho.fiSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 624ff4b2
...@@ -793,7 +793,7 @@ int ieee80211_key_link(struct ieee80211_key *key, ...@@ -793,7 +793,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
/* Non-pairwise keys must also not switch the cipher on rekey */ /* Non-pairwise keys must also not switch the cipher on rekey */
if (!pairwise) { if (!pairwise) {
if (key && old_key && old_key->conf.cipher != key->conf.cipher) if (old_key && old_key->conf.cipher != key->conf.cipher)
goto out; goto out;
} }
......
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