提交 cc4d623d 编写于 作者: V Vasanthakumar Thiagarajan 提交者: Kalle Valo

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: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
上级 e8ad9a06
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册