mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
qcacld-3.0: Fix Static Analysis Issues
1) Check for bssid if it is NULL, before dereferencing it. 2) Check for hal_ctx if it is NULL, before dereferencing it. CRs-Fixed: 940721 Change-Id: I836416a4717b15902e8b8f27fa2e5e5e7935c12f
This commit is contained in:
parent
b8954c6402
commit
f76f6de348
1 changed files with 6 additions and 1 deletions
|
|
@ -1415,7 +1415,7 @@ static int csr_get_altered_rssi(tpAniSirGlobal mac_ctx, int rssi,
|
|||
* preferred score
|
||||
*/
|
||||
cdf_mem_zero(&fav_bssid.bytes, CDF_MAC_ADDR_SIZE);
|
||||
if (roam_params->num_bssid_favored) {
|
||||
if (bssid && roam_params->num_bssid_favored) {
|
||||
for (i = 0; i < roam_params->num_bssid_favored; i++) {
|
||||
cdf_mem_copy(fav_bssid.bytes,
|
||||
&roam_params->bssid_favored[i],
|
||||
|
|
@ -7110,6 +7110,11 @@ void csr_scan_active_list_timeout_handle(void *userData)
|
|||
FL("Scan Timeout: Scan command is NULL"));
|
||||
return;
|
||||
}
|
||||
if (hal_ctx == NULL) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
|
||||
FL("HAL Context is NULL"));
|
||||
return;
|
||||
}
|
||||
mac_ctx = PMAC_STRUCT(hal_ctx);
|
||||
scan_id = scan_cmd->u.scanCmd.scanID;
|
||||
sms_log(mac_ctx, LOGE,
|
||||
|
|
|
|||
Loading…
Reference in a new issue