Skip to content

Commit 3004fcb

Browse files
committed
Merge tag 'v5.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus
Peter writes: Fixes one issue with dequeuing requests after disabling endpoint for cdnsp udc driver * tag 'v5.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fixes issue with dequeuing requests after disabling endpoint
2 parents e49d033 + cf97d7a commit 3004fcb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/cdns3/cdnsp-gadget.c

+4
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,10 @@ static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep,
11281128
return -ESHUTDOWN;
11291129
}
11301130

1131+
/* Requests has been dequeued during disabling endpoint. */
1132+
if (!(pep->ep_state & EP_ENABLED))
1133+
return 0;
1134+
11311135
spin_lock_irqsave(&pdev->lock, flags);
11321136
ret = cdnsp_ep_dequeue(pep, to_cdnsp_request(request));
11331137
spin_unlock_irqrestore(&pdev->lock, flags);

0 commit comments

Comments
 (0)