mirror of
https://github.com/torvalds/linux.git
synced 2024-12-20 01:52:13 +00:00
ath6kl: Remove redundant pointer check
'params' is already used earlier and there is no point in checking for a NULL condition again. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
866dc88607
commit
4a8ce2fd05
@ -983,6 +983,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct ath6kl *ar = ath6kl_priv(ndev);
|
||||
struct ath6kl_vif *vif = netdev_priv(ndev);
|
||||
struct ath6kl_key *key = NULL;
|
||||
int seq_len;
|
||||
u8 key_usage;
|
||||
u8 key_type;
|
||||
|
||||
@ -1011,8 +1012,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
else
|
||||
key_usage = GROUP_USAGE;
|
||||
|
||||
if (params) {
|
||||
int seq_len = params->seq_len;
|
||||
seq_len = params->seq_len;
|
||||
if (params->cipher == WLAN_CIPHER_SUITE_SMS4 &&
|
||||
seq_len > ATH6KL_KEY_SEQ_LEN) {
|
||||
/* Only first half of the WPI PN is configured */
|
||||
@ -1027,7 +1027,6 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
key->seq_len = seq_len;
|
||||
memcpy(key->seq, params->seq, key->seq_len);
|
||||
key->cipher = params->cipher;
|
||||
}
|
||||
|
||||
switch (key->cipher) {
|
||||
case WLAN_CIPHER_SUITE_WEP40:
|
||||
|
Loading…
Reference in New Issue
Block a user