dwc3: gadget: Fix list corruption issue with dequeue API

dwc3_ep_dequeue() API does wait for completion of request after
releasing spinlock, and reacquire same spinlock on getting unblock.
Here there is possibility that request may have been completed
itself and removed from started_list (dwc3_gadget_giveback() may
already completed). Hence if req->trb is NULL, don't try to call
dwc3_gadget_giveback() API which tries to delete request from
started_list which results into list corruption.

Change-Id: I60ecf2df6a154f12363af35ed3a6947e990eee0e
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
1 file changed