Commit 3004fcba authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'v5.12-rc5' of...

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
parents e49d033b cf97d7af
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1128,6 +1128,10 @@ static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep,
		return -ESHUTDOWN;
	}

	/* Requests has been dequeued during disabling endpoint. */
	if (!(pep->ep_state & EP_ENABLED))
		return 0;

	spin_lock_irqsave(&pdev->lock, flags);
	ret = cdnsp_ep_dequeue(pep, to_cdnsp_request(request));
	spin_unlock_irqrestore(&pdev->lock, flags);