From 10415ce039ab4572060477a02ece35af9e37c91f Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Mon, 4 Jul 2016 11:21:09 +0530 Subject: [PATCH] qcacld-3.0: Add NULL check before dereferencing pdev Add NULL check before dereferencing pdev in wma_mgmt_tx_completion_handler. Change-Id: If7e06e2e46436f96a18d6c6b9ad6fc6afd7a4d8b CRs-fixed: 1034746 --- core/wma/src/wma_mgmt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 3542ce927646..5d037b8b668e 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -2469,6 +2469,10 @@ int wma_mgmt_tx_completion_handler(void *handle, uint8_t *cmpl_event_params, struct wmi_desc_t *wmi_desc; ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX); + if (!pdev) { + WMA_LOGE("%s: txrx pdev is NULL", __func__); + return -EINVAL; + } if (pdev == NULL) { WMA_LOGE("%s: NULL pdev pointer", __func__);