From 965035c642cab2cdc4bc9162b366e89c051c733c Mon Sep 17 00:00:00 2001 From: Venkata Sharath Chandra Manchala Date: Wed, 16 Jan 2019 12:36:39 -0800 Subject: [PATCH] qcacmn: Access soc handle after null check Dereference soc handle after checking if soc handle is valid. Change-Id: Ifc409ab410b0ff41ad7d45c422f147325d7adadf CRs-Fixed: 2382178 --- dp/wifi3.0/dp_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 578fbb602593..58e483d2e2ee 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6620,9 +6620,10 @@ dp_print_ring_stat_from_hal(struct dp_soc *soc, struct dp_srng *srng, int32_t hw_headp = -1; int32_t hw_tailp = -1; const char *ring_name; - struct hal_soc *hal_soc = (struct hal_soc *)soc->hal_soc; + struct hal_soc *hal_soc; if (soc && srng && srng->hal_srng) { + hal_soc = (struct hal_soc *)soc->hal_soc; ring_name = dp_srng_get_str_from_hal_ring_type(ring_type); hal_get_sw_hptp(soc->hal_soc, srng->hal_srng, &tailp, &headp);