summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2017-02-20 11:24:55 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-02-21 21:21:13 -0800
commitc166c54476061299e286c8c3b3f2e8a5b5cabf6b (patch)
tree9557cae072c8bfc7db9cf719d1a6baadad92f8f2
parent910dc71e9c673d2fb31c5cf51d315d15764456af (diff)
qcacld-3.0: Avoid NULL pointer dereferencing of cds_cfg
Avoid NULL pointer dereferencing of cds_cfg by putting NULL check before using it in hdd_set_rx_mode_rps func. Change-Id: I6421ba6d4f2c6cbb4a726d1ea7b054c4d383ec5a CRs-Fixed: 2008900
-rw-r--r--core/hdd/src/wlan_hdd_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 60d76395df2e..8e48cd95e11f 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -7978,7 +7978,7 @@ void hdd_set_rx_mode_rps(hdd_context_t *hdd_ctx, void *padapter,
struct cds_config_info *cds_cfg = cds_get_ini_config();
hdd_adapter_t *adapter = padapter;
- if (adapter && hdd_ctx &&
+ if (adapter && hdd_ctx && cds_cfg &&
!hdd_ctx->rps && cds_cfg->uc_offload_enabled) {
if (enable && !cds_cfg->rps_enabled)
hdd_send_rps_ind(adapter);