From: Vasanthakumar Thiagarajan Date: Tue, 14 Feb 2012 15:03:00 +0000 (+0530) Subject: ath6kl: Remove bogus non-NULL pointer check X-Git-Tag: v3.12-rc1~2707^2~57^2~287^2~118 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc4d623de46616825d9330467e0a7375835171be;p=kernel%2Fkernel-generic.git ath6kl: Remove bogus non-NULL pointer check In ath6kl_cfg80211_add_key(), params is checked for non-NULL but this pointer has been deferenced many times before this check. This gives the following smatch warning. add_key() can never carry NULL as params, remove this bogus check. ath6kl_cfg80211_add_key(86) warn: variable dereferenced before check 'params' Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 8687989..a476880 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1059,7 +1059,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, if (vif->nw_type == AP_NETWORK && !pairwise && (key_type == TKIP_CRYPT || key_type == AES_CRYPT || - key_type == WAPI_CRYPT) && params) { + key_type == WAPI_CRYPT)) { ar->ap_mode_bkey.valid = true; ar->ap_mode_bkey.key_index = key_index; ar->ap_mode_bkey.key_type = key_type;