Pointer mac is returned from function cds_get_context which might return NULL. So NULL check for mac pointer is added before dereferencing it. Change-Id: I9258dc625144650c077fd457827fc24610732b77 CRs-Fixed: 3746451
@@ -3231,6 +3231,11 @@ static QDF_STATUS wma_wow_pagefault_action_cb(void *buf)
{
struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
+ if (!mac) {
+ wma_err("NULL mac ptr");
+ return QDF_STATUS_E_INVAL;
+ }
+
return mac->sme.pagefault_action_cb(buf, WLAN_WMA_PF_APPS_NOTIFY_BUF_LEN);
}