qcedev: fix qcedev_async_req status update in req_done
Issue: qcedev_async_req status is updated after sending complete signal that makes qcedev_ioctl exit and freed the memory. Fix: update qcedev_async_req status before sending complete signal. Change-Id: I6c224b4775b8860c1c50f9a1f9e3705a6ca76e34 Signed-off-by: Om Prakash Singh <quic_omprsing@quicinc.com> (cherry picked from commit 582cf8006a08f459573a30821270d72fd8788b15)
This commit is contained in:

committed by
Udit Tiwari

parent
fd37da76a2
commit
dd578986f7
@@ -334,9 +334,9 @@ static void req_done(unsigned long data)
|
||||
podev->active_command = NULL;
|
||||
|
||||
if (areq) {
|
||||
areq->state = QCEDEV_REQ_DONE;
|
||||
if (!areq->timed_out)
|
||||
complete(&areq->complete);
|
||||
areq->state = QCEDEV_REQ_DONE;
|
||||
}
|
||||
|
||||
/* Look through queued requests and wake up the corresponding thread */
|
||||
|
Reference in New Issue
Block a user