mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Fix some kw warnings
In function hdd_process_genie(), pointers like encrypt_type and mc_encrypt_type should be validated before getting dereferenced. Add pointer validation before every dereferencing takes place. Change-Id: Ib894153ddac3e75fae5e0e7798b705ac5951ea17 CRs-Fixed: 2775378
This commit is contained in:
parent
db3710b638
commit
fae1b8966e
1 changed files with 8 additions and 4 deletions
|
|
@ -4946,11 +4946,13 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
|
|||
hdd_translate_rsn_to_csr_auth_type(
|
||||
dot11_rsn_ie.akm_suite[0]);
|
||||
/* dot11_rsn_ie.pwise_cipher_suite_count */
|
||||
*encrypt_type =
|
||||
if (encrypt_type)
|
||||
*encrypt_type =
|
||||
hdd_translate_rsn_to_csr_encryption_type(
|
||||
dot11_rsn_ie.pwise_cipher_suites[0]);
|
||||
/* dot11_rsn_ie.gp_cipher_suite_count */
|
||||
*mc_encrypt_type =
|
||||
if (mc_encrypt_type)
|
||||
*mc_encrypt_type =
|
||||
hdd_translate_rsn_to_csr_encryption_type(
|
||||
dot11_rsn_ie.gp_cipher_suite);
|
||||
#ifdef WLAN_FEATURE_11W
|
||||
|
|
@ -4989,11 +4991,13 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
|
|||
hdd_translate_wpa_to_csr_auth_type(
|
||||
dot11_wpa_ie.auth_suites[0]);
|
||||
/* dot11_wpa_ie.unicast_cipher_count */
|
||||
*encrypt_type =
|
||||
if (encrypt_type)
|
||||
*encrypt_type =
|
||||
hdd_translate_wpa_to_csr_encryption_type(
|
||||
dot11_wpa_ie.unicast_ciphers[0]);
|
||||
/* dot11_wpa_ie.unicast_cipher_count */
|
||||
*mc_encrypt_type =
|
||||
if (mc_encrypt_type)
|
||||
*mc_encrypt_type =
|
||||
hdd_translate_wpa_to_csr_encryption_type(
|
||||
dot11_wpa_ie.multicast_cipher);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue