Add NULL pointer check in function hif_send_single() and htc_dump_counter_info() for KW issues. Change-Id: I4b020c566b14b28a825c13752dccf67b5f8bb837 CRs-Fixed: 2675205
@@ -1562,6 +1562,9 @@ QDF_STATUS hif_send_single(struct hif_opaque_softc *osc, qdf_nbuf_t msdu,
{
void *ce_tx_hdl = hif_get_ce_handle(osc, CE_HTT_TX_CE);
+ if (!ce_tx_hdl)
+ return QDF_STATUS_E_NULL_VALUE;
+
return ce_send_single((struct CE_handle *)ce_tx_hdl, msdu, transfer_id,
len);
}
@@ -69,6 +69,9 @@ void htc_dump_counter_info(HTC_HANDLE HTCHandle)
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
+ if (!target)
+ return;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("\n%s: ce_send_cnt = %d, TX_comp_cnt = %d\n",
__func__, target->ce_send_cnt, target->TX_comp_cnt));