mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Fix static analysis issues in wma
Resolve static analysis issues - NULL pointer dereference and array boundary checking. Change-Id: Ia509cdb9b61d4f7b86175e3b3ec6d4691fc1f7a2 CRs-Fixed: 2162260
This commit is contained in:
parent
629e7276cf
commit
01a45f7d33
3 changed files with 14 additions and 7 deletions
|
|
@ -3499,8 +3499,7 @@ static bool wma_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
should_drop = true;
|
||||
}
|
||||
}
|
||||
*cdp_peer_last_assoc_received(soc, peer) =
|
||||
qdf_get_system_timestamp();
|
||||
*ptr = qdf_get_system_timestamp();
|
||||
break;
|
||||
case IEEE80211_FC0_SUBTYPE_DISASSOC:
|
||||
ptr = cdp_peer_last_disassoc_received(soc, peer);
|
||||
|
|
@ -3515,8 +3514,7 @@ static bool wma_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
should_drop = true;
|
||||
}
|
||||
}
|
||||
*cdp_peer_last_disassoc_received(soc, peer) =
|
||||
qdf_get_system_timestamp();
|
||||
*ptr = qdf_get_system_timestamp();
|
||||
break;
|
||||
case IEEE80211_FC0_SUBTYPE_DEAUTH:
|
||||
ptr = cdp_peer_last_deauth_received(soc, peer);
|
||||
|
|
@ -3531,8 +3529,7 @@ static bool wma_is_pkt_drop_candidate(tp_wma_handle wma_handle,
|
|||
should_drop = true;
|
||||
}
|
||||
}
|
||||
*cdp_peer_last_deauth_received(soc, peer) =
|
||||
qdf_get_system_timestamp();
|
||||
*ptr = qdf_get_system_timestamp();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -6112,6 +6112,11 @@ QDF_STATUS wma_get_scan_id(uint32_t *scan_id)
|
|||
return QDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
if (!wma) {
|
||||
WMA_LOGE("%s: wma handle is NULL", __func__);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
#ifdef NAPIER_SCAN
|
||||
*scan_id = ucfg_scan_get_scan_id(wma->psoc);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -4666,6 +4666,11 @@ bool wma_is_service_enabled(WMI_SERVICE service_type)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (service_type >= WMI_MAX_SERVICE) {
|
||||
WMA_LOGE("%s: Invalid service type %d", __func__, service_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
return WMI_SERVICE_IS_ENABLED(wma->wmi_service_bitmap, service_type);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue