From efb077864e76dd312fbf461eea24a7fb0b97c7f3 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Thu, 4 Jun 2020 11:41:54 +0530 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_tx_rx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index ff5c204cfdf3..4c7857d39f0b 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -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,