From 55fcf5a1c8ae88ea622689fb0326ce66d6e3dd64 Mon Sep 17 00:00:00 2001 From: Houston Hoffman Date: Tue, 27 Sep 2016 23:21:51 -0700 Subject: [PATCH] qcacmn: Check ce_state for null before dereference in ce_mark_datapath Dereference was happening before the null check. Also simplified the data structure traversal since we are inside hif. Change-Id: I2370402f3d080bd413ab949a40dc5d97fba6be27 CRs-Fixed: 1072077 --- hif/src/ce/ce_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index b86f9e4bc4de..5aa62821d495 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -521,10 +521,11 @@ bool ce_mark_datapath(struct CE_state *ce_state) size_t map_sz; int i; bool rc = false; - struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(ce_state->scn); - struct hif_target_info *tgt_info = hif_get_target_info_handle(hif_hdl); + struct hif_target_info *tgt_info; if (ce_state != NULL) { + tgt_info = &ce_state->scn->target_info; + if (QDF_IS_EPPING_ENABLED(hif_get_conparam(ce_state->scn))) { svc_map = target_service_to_ce_map_wlan_epping; map_sz = sizeof(target_service_to_ce_map_wlan_epping) /