Skip to content

Commit 34f08eb

Browse files
pawellcdnsgregkh
authored andcommitted
usb: cdnsp: Fixes issue with dequeuing not queued requests
Gadget ACM while unloading module try to dequeue not queued usb request which causes the kernel to crash. Patch adds extra condition to check whether usb request is processed by CDNSP driver. cc: stable@vger.kernel.org Fixes: 3d82904 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak <pawell@cadence.com> Acked-by: Peter Chen <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20230713081429.326660-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 57e50f4 commit 34f08eb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/cdns3/cdnsp-gadget.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,9 @@ static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep,
11251125
unsigned long flags;
11261126
int ret;
11271127

1128+
if (request->status != -EINPROGRESS)
1129+
return 0;
1130+
11281131
if (!pep->endpoint.desc) {
11291132
dev_err(pdev->dev,
11301133
"%s: can't dequeue to disabled endpoint\n",

0 commit comments

Comments
 (0)