* re: ath6kl: Remove redundant pointer check
@ 2012-02-07 13:00 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-02-07 13:00 UTC (permalink / raw)
To: c_manoha; +Cc: linux-wireless
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-07 13:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 13:00 ath6kl: Remove redundant pointer check Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.