wlan: Fix issues found by static code analysis in SAP
Fix the issues reported by static code analysis tool
Change-Id: I42786698f28c8decae20d69a39084e3b27905501
CRs-Fixed: 642583
diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c
index b5caadb..dc363bc 100644
--- a/CORE/SAP/src/sapChSelect.c
+++ b/CORE/SAP/src/sapChSelect.c
@@ -537,6 +537,13 @@
tSapSpectChInfo *pExtSpectCh = NULL;
v_S31_t rssi;
+ if (NULL == pSpectCh)
+ {
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ "%s: pSpectCh is NULL", __func__);
+ return;
+ }
+
switch(pSpectCh->chNum)
{
case CHANNEL_1: