Search Linux Wireless

[PATCH] mac80211: remove useless NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Eytan Lifshitz <eytan.lifshitz@xxxxxxxxx>

sdata can't be NULL, don't add a superfluous check.
This 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@xxxxxxxxx>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@xxxxxxxxx>
---
 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 16d97f0..a16d9a2 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -482,7 +482,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
 	int idx, ret;
 	bool pairwise;
 
-	if (WARN_ON(!sdata || !key))
+	if (WARN_ON(!key))
 		return -EINVAL;
 
 	pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux