From 9510742a7c15c47d5faa2a86b2a656ee089b1888 Mon Sep 17 00:00:00 2001 From: Sanjay Devnani Date: Wed, 15 Oct 2014 09:23:41 -0700 Subject: WLAN: Null check CE handle before dereferncing it For error recovery and system stability Change-Id: I450ea438d988659fd9a4cefabe4bd0b1ce68a195 CRs-Fixed: 739135 --- CORE/SERVICES/HIF/PCIe/hif_pci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c index 623f0916394a..7995d2841ea4 100644 --- a/CORE/SERVICES/HIF/PCIe/hif_pci.c +++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c @@ -330,6 +330,12 @@ HIFSend_head(HIF_DEVICE *hif_device, pipe_info->num_sends_allowed -= nfrags; adf_os_spin_unlock_bh(&pipe_info->completion_freeq_lock); + if(adf_os_unlikely(ce_hdl == NULL)) { + AR_DEBUG_PRINTF(ATH_DEBUG_ERR, + ("%s: error CE handle is null\n", __func__)); + return A_ERROR; + } + status = CE_sendlist_send(ce_hdl, nbuf, &sendlist, transfer_id); A_ASSERT(status == A_OK); -- cgit v1.2.3