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
This commit is contained in:
@@ -1779,20 +1779,21 @@ static void __policy_mgr_check_sta_ap_concurrent_ch_intf(void *data)
|
|||||||
work_info = data;
|
work_info = data;
|
||||||
if (!work_info) {
|
if (!work_info) {
|
||||||
policy_mgr_err("Invalid work_info");
|
policy_mgr_err("Invalid work_info");
|
||||||
goto end;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
psoc = work_info->psoc;
|
psoc = work_info->psoc;
|
||||||
if (!psoc) {
|
if (!psoc) {
|
||||||
policy_mgr_err("Invalid psoc");
|
policy_mgr_err("Invalid psoc");
|
||||||
goto end;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pm_ctx = policy_mgr_get_context(psoc);
|
pm_ctx = policy_mgr_get_context(psoc);
|
||||||
if (!pm_ctx) {
|
if (!pm_ctx) {
|
||||||
policy_mgr_err("Invalid context");
|
policy_mgr_err("Invalid context");
|
||||||
goto end;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mcc_to_scc_switch =
|
mcc_to_scc_switch =
|
||||||
policy_mgr_get_mcc_to_scc_switch_mode(psoc);
|
policy_mgr_get_mcc_to_scc_switch_mode(psoc);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user