Browse Source

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
Chaithanya Garrepalli 7 years ago
parent
commit
396bbc8f6f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      dp/inc/cdp_txrx_host_stats.h

+ 2 - 1
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;