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
This commit is contained in:
Chaithanya Garrepalli 2018-05-11 15:59:39 +05:30 • committed by nshrivas
commit 396bbc8f6f

View file

@ -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;