From 3a8d34c8cb83af35731f552bf5d5882f0b57a89b Mon Sep 17 00:00:00 2001 From: Qun Zhang Date: Thu, 19 Mar 2020 13:41:37 +0800 Subject: [PATCH] qcacld-3.0: Make sure NULL pm_ctx pointer not be accessed before initialization Make sure NULL pm_ctx pointer not be accessed before initialization. Before initialization, __policy_mgr_check_sta_ap_concurrent_ch_intf return directly when meet error condition. Change-Id: I4a96ca7c18d7c524969b8ea95d3bc717cfb0862c CRs-Fixed: 2642567 --- .../cmn_services/policy_mgr/src/wlan_policy_mgr_action.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c index d37745918c4b..64967efea281 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c @@ -1779,20 +1779,21 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data) work_info = data; if (!work_info) { policy_mgr_err("Invalid work_info"); - goto end; + return; } psoc = work_info->psoc; if (!psoc) { policy_mgr_err("Invalid psoc"); - goto end; + return; } pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { policy_mgr_err("Invalid context"); - goto end; + return; } + mcc_to_scc_switch = policy_mgr_get_mcc_to_scc_switch_mode(psoc);