usb: cdnsp: Fixes issue with dequeuing not queued requests
commit 34f08eb0ba6e4869bbfb682bf3d7d0494ffd2f87 upstream.
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: 3d82904559 ("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>
This commit is contained in:
parent
49fbc18378
commit
033c0d5101
1 changed files with 3 additions and 0 deletions
|
|
@ -1125,6 +1125,9 @@ static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep,
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (request->status != -EINPROGRESS)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!pep->endpoint.desc) {
|
if (!pep->endpoint.desc) {
|
||||||
dev_err(pdev->dev,
|
dev_err(pdev->dev,
|
||||||
"%s: can't dequeue to disabled endpoint\n",
|
"%s: can't dequeue to disabled endpoint\n",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue