qcacld-3.0: Possible null pointer dereference

cds_cfg is assigned the return value from function
cds_get_ini_config. cds_cfg may be null pointer. Add
null pointer check before cds_cfg is
dereferenced.

Change-Id: I184c0a589fa660c5c49cd951986ad918cbc42bcd
CRs-Fixed: 2518433
This commit is contained in:
tinlin 2019-08-30 15:14:13 +08:00 • committed by nshrivas
commit a8193944ec

View file

@ -191,7 +191,7 @@ static int cds_sched_find_attach_cpu(p_cds_sched_context pSchedContext,
if (!cpumask_equal(&pSchedContext->rx_thread_cpu_mask, &new_mask)) {
cds_cfg = cds_get_ini_config();
cpumask_copy(&pSchedContext->rx_thread_cpu_mask, &new_mask);
if (cds_cfg->enable_dp_rx_threads)
if (cds_cfg && cds_cfg->enable_dp_rx_threads)
dp_txrx_set_cpu_mask(cds_get_context(QDF_MODULE_ID_SOC),
&new_mask);
else