From: Dan Carpenter <dan.carpenter@oracle.com>
To: c_manoha@qca.qualcomm.com
Cc: linux-wireless@vger.kernel.org
Subject: re: ath6kl: Remove redundant pointer check
Date: Tue, 7 Feb 2012 16:00:02 +0300 [thread overview]
Message-ID: <20120207130002.GA14460@elgon.mountain> (raw)
Hello Sujith Manoharan,
This is a semi-automatic email about new static checker warnings.
The patch 4a8ce2fd055f: "ath6kl: Remove redundant pointer check" from
Jan 10, 2012, leads to the following Smatch complaint:
drivers/net/wireless/ath/ath6kl/cfg80211.c:1061 ath6kl_cfg80211_add_key()
warn: variable dereferenced before check 'params' (see line 1026)
drivers/net/wireless/ath/ath6kl/cfg80211.c
1025 memcpy(key->seq, params->seq, key->seq_len);
1026 key->cipher = params->cipher;
^^^^^^^^^^^^^^
dereference.
1027
1028 switch (key->cipher) {
1029 case WLAN_CIPHER_SUITE_WEP40:
1030 case WLAN_CIPHER_SUITE_WEP104:
1031 key_type = WEP_CRYPT;
1032 break;
[ snip ]
1058
1059 if (vif->nw_type == AP_NETWORK && !pairwise &&
1060 (key_type == TKIP_CRYPT || key_type == AES_CRYPT ||
1061 key_type == WAPI_CRYPT) && params) {
^^^^^^
check. This check is redundant too so we should remove it as well.
1062 ar->ap_mode_bkey.valid = true;
1063 ar->ap_mode_bkey.key_index = key_index;
regards,
dan carpenter
reply other threads:[~2012-02-07 13:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120207130002.GA14460@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=c_manoha@qca.qualcomm.com \
--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