diff options
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod_gadget.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index de4f97d84a82..8f7a78e70975 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -131,7 +131,8 @@ static void __usbhsg_queue_pop(struct usbhsg_uep *uep, | |||
131 | struct device *dev = usbhsg_gpriv_to_dev(gpriv); | 131 | struct device *dev = usbhsg_gpriv_to_dev(gpriv); |
132 | struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); | 132 | struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); |
133 | 133 | ||
134 | dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe)); | 134 | if (pipe) |
135 | dev_dbg(dev, "pipe %d : queue pop\n", usbhs_pipe_number(pipe)); | ||
135 | 136 | ||
136 | ureq->req.status = status; | 137 | ureq->req.status = status; |
137 | spin_unlock(usbhs_priv_to_lock(priv)); | 138 | spin_unlock(usbhs_priv_to_lock(priv)); |
@@ -685,7 +686,13 @@ static int usbhsg_ep_dequeue(struct usb_ep *ep, struct usb_request *req) | |||
685 | struct usbhsg_request *ureq = usbhsg_req_to_ureq(req); | 686 | struct usbhsg_request *ureq = usbhsg_req_to_ureq(req); |
686 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); | 687 | struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep); |
687 | 688 | ||
688 | usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); | 689 | if (pipe) |
690 | usbhs_pkt_pop(pipe, usbhsg_ureq_to_pkt(ureq)); | ||
691 | |||
692 | /* | ||
693 | * To dequeue a request, this driver should call the usbhsg_queue_pop() | ||
694 | * even if the pipe is NULL. | ||
695 | */ | ||
689 | usbhsg_queue_pop(uep, ureq, -ECONNRESET); | 696 | usbhsg_queue_pop(uep, ureq, -ECONNRESET); |
690 | 697 | ||
691 | return 0; | 698 | return 0; |