linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 7/8] mac80211: don't check if key is NULL in ieee80211_key_link()
Date: Fri, 30 Aug 2019 14:24:50 +0300	[thread overview]
Message-ID: <20190830112451.21655-8-luca@coelho.fi> (raw)
In-Reply-To: <20190830112451.21655-1-luca@coelho.fi>

From: Luca Coelho <luciano.coelho@intel.com>

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: 96fc6efb9ad9 ("mac80211: IEEE 802.11 Extended Key ID support")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 net/mac80211/key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 93ea03b86b80..0f889b919b06 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -793,7 +793,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
 
 	/* Non-pairwise keys must also not switch the cipher on rekey */
 	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;
 	}
 
-- 
2.23.0.rc1


  parent reply	other threads:[~2019-08-30 11:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 11:24 [PATCH 0/8] cfg80211/mac80211 patches from our internal tree 2019-08-30 Luca Coelho
2019-08-30 11:24 ` [PATCH 1/8] cfg80211: always shut down on HW rfkill Luca Coelho
2019-08-30 11:24 ` Luca Coelho
2019-08-30 11:40   ` [PATCH v2] mac80211: vht: add support VHT EXT NSS BW in parsing VHT Luca Coelho
2019-08-30 11:24 ` [PATCH 3/8] mac80211: list features in WEP/TKIP disable in better order Luca Coelho
2019-08-30 11:24 ` [PATCH 4/8] mac80211: Allow user space to register for station Rx authentication Luca Coelho
2019-09-11  8:27   ` Johannes Berg
2019-08-30 11:24 ` [PATCH 5/8] mac80211: remove unnecessary key condition Luca Coelho
2019-08-30 11:24 ` [PATCH 6/8] mac80211: clear crypto tx tailroom counter upon keys enable Luca Coelho
2019-08-30 11:24 ` Luca Coelho [this message]
2019-08-30 11:24 ` [PATCH 8/8] mac80211: IBSS: send deauth when expiring inactive STAs Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830112451.21655-8-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).