prima: Fix issues found by static code analysis.

To fix issues found by static code analysis after KW10 upgrade

Change-Id: I88c3b507bdf38b7769086b540f68456b1aa17e56
CRs-Fixed: 642539
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 7d865cf..95696ec 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -4337,6 +4337,11 @@
 
     chan = __ieee80211_get_channel(wiphy, freq);
 
+    if (!chan) {
+       hddLog(VOS_TRACE_LEVEL_ERROR, "%s chan pointer is NULL", __func__);
+       return NULL;
+    }
+
     bss = cfg80211_get_bss(wiphy, chan, pBssDesc->bssId,
                            &roamProfile->SSID.ssId[0], roamProfile->SSID.length,
                            WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);