From 396bbc8f6f2e4f3dbf1e22513f16eb3f2b189e8f Mon Sep 17 00:00:00 2001 From: Chaithanya Garrepalli Date: Fri, 11 May 2018 15:59:39 +0530 Subject: [PATCH] qcacmn: add null checks in cdp_get_dp_htt_stats Add null checks in cdp_get_dp_htt_stats for soc Change-Id: Ifb158a33c1daddfb4aafa3fe4a88efbd57e70d48 CRs-Fixed: 2240121 --- dp/inc/cdp_txrx_host_stats.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dp/inc/cdp_txrx_host_stats.h b/dp/inc/cdp_txrx_host_stats.h index 6ac24b724669..179dd785e649 100644 --- a/dp/inc/cdp_txrx_host_stats.h +++ b/dp/inc/cdp_txrx_host_stats.h @@ -405,7 +405,8 @@ static inline void cdp_get_dp_htt_stats(ol_txrx_soc_handle soc, struct cdp_pdev *pdev, void *data, uint32_t data_len) { - if (soc->ops->host_stats_ops->get_htt_stats) + if (soc && soc->ops && soc->ops->host_stats_ops && + soc->ops->host_stats_ops->get_htt_stats) return soc->ops->host_stats_ops->get_htt_stats (pdev, data, data_len); return;