diff options
| author | Manjunathappa Prakash <c_pmanju@qca.qualcomm.com> | 2014-05-20 18:50:48 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-05-23 13:13:39 -0700 |
| commit | ee802bf4ef855cfe331964c6d566b265a5b58293 (patch) | |
| tree | bf610c9988cdc74e1aa1d7fded2d00d39ef2f6a6 | |
| parent | 452532ddd1b1973b16e828bb8a3e07530b215321 (diff) | |
qcacld-new: check for NULL endpoint recv callback
Patch checks for endpoint NULL recieve callback on packet, without
this kernel crash is observed.
Change-Id: Ic1f1e028d73d539554e145d6caa3fd4c80edcc2d
CRs-Fixed: 666036
| -rw-r--r-- | CORE/SERVICES/HTC/htc_recv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CORE/SERVICES/HTC/htc_recv.c b/CORE/SERVICES/HTC/htc_recv.c index 9df06b4e5c85..1438d45f283c 100644 --- a/CORE/SERVICES/HTC/htc_recv.c +++ b/CORE/SERVICES/HTC/htc_recv.c @@ -99,7 +99,12 @@ static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint, /* using legacy EpRecv */ while (!HTC_QUEUE_EMPTY(pQueueToIndicate)) { pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); - AR_DEBUG_PRINTF(ATH_DEBUG_RECV, (" HTC calling ep %d recv callback on packet %p \n", + if (pEndpoint->EpCallBacks.EpRecv == NULL) { + AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTC ep %d has NULL recv callback on packet %p\n", + pEndpoint->Id, pPacket)); + continue; + } + AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("HTC calling ep %d recv callback on packet %p\n", pEndpoint->Id, pPacket)); pEndpoint->EpCallBacks.EpRecv(pEndpoint->EpCallBacks.pContext, pPacket); } |
