Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 550235fe authored by Mayank Rana's avatar Mayank Rana
Browse files

USB: dwc3: msm: Fix error handling with dwc3_msm_ep_queue()



If __dwc3_msm_ep_queue() fails, then req_complete is freed
but it is not being removed from mdwc->request_list. This
may result into list_add corruption issue on next USB cable
connect when USB endless request is queued. Fix this issue
by deleting req_complete from mdwc->req_complete_list.

CRs-Fixed: 1007571
Change-Id: I00300bc529db75593939a13fbea33acefa717da5
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent e551e7a6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -755,6 +755,7 @@ static int dwc3_msm_ep_queue(struct usb_ep *ep,
	return 0;

err:
	list_del(&req_complete->list_item);
	spin_unlock_irqrestore(&dwc->lock, flags);
	kfree(req_complete);
	return ret;