qcacld-3.0: Add Null check for soc before accessing

Check if the soc pointer is not NULL, before we
try to derefernce this pointer.

Change-Id: Ife499e7617365278c4ac8fd41e2ce32d4e19fae9
CRs-Fixed: 2702127
This commit is contained in:
Rakesh Pillai 2020-06-04 11:41:54 +05:30 • committed by nshrivas
commit efb077864e

View file

@ -2044,6 +2044,9 @@ QDF_STATUS hdd_rx_flush_packet_cbk(void *adapter_context, uint8_t vdev_id)
struct hdd_context *hdd_ctx;
ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
if (qdf_unlikely(!soc))
return QDF_STATUS_E_FAILURE;
hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
if (unlikely(!hdd_ctx)) {
QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_ERROR,