summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGovind Singh <govinds@qti.qualcomm.com>2015-11-02 17:54:21 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2015-11-05 13:23:47 +0530
commitb78eaf2ab460d3174a87fc45ba195cf9de6a3d1d (patch)
treeec7979a37aaed255c965fcd5622d11b64a3d1238
parent481e31700bcaa060bca5acc6dece04608ef71f49 (diff)
qcacld-2.0: Fix static code analysis errors
Updated the wma, htt modules to address the issues reported by static code analysis. CRs-Fixed: 933728 Change-Id: I3437f7d9a12475f4a854412d9f34f48ed7553848
-rw-r--r--CORE/CLD_TXRX/HTT/htt_tx.c2
-rw-r--r--CORE/SERVICES/WMA/wma.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt_tx.c b/CORE/CLD_TXRX/HTT/htt_tx.c
index 350bfe15aa24..070b18aba897 100644
--- a/CORE/CLD_TXRX/HTT/htt_tx.c
+++ b/CORE/CLD_TXRX/HTT/htt_tx.c
@@ -274,7 +274,7 @@ adf_os_dma_addr_t htt_tx_get_paddr(htt_pdev_handle pdev, char *target_vaddr)
for (i = 0; i < pdev->num_pages; i++) {
page_info = pdev->desc_pages + i;
- if (!page_info->page_v_addr_start) {
+ if (!page_info || !page_info->page_v_addr_start) {
adf_os_assert(0);
return 0;
}
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 025b24ccbd71..1a70e3497f99 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -7308,6 +7308,16 @@ static void wma_set_sta_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
WMITLV_GET_STRUCT_TLVLEN(WMI_STA_KEEPALVE_ARP_RESPONSE));
if (method == SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP) {
+ if ((NULL == hostv4addr) ||
+ (NULL == destv4addr) ||
+ (NULL == destmac)) {
+ WMA_LOGE("%s: received null pointer, hostv4addr:%p "
+ "destv4addr:%p destmac:%p ", __func__,
+ hostv4addr, destv4addr, destmac);
+ adf_nbuf_free(buf);
+ return;
+ }
+
cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE;
vos_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr,
SIR_IPV4_ADDR_LEN);