diff options
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 21d1406af9ee..7600a0c78753 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -542,13 +542,14 @@ dummy_queue (struct usb_ep *_ep, struct usb_request *_req, | |||
542 | req->req.context = dum; | 542 | req->req.context = dum; |
543 | req->req.complete = fifo_complete; | 543 | req->req.complete = fifo_complete; |
544 | 544 | ||
545 | list_add_tail(&req->queue, &ep->queue); | ||
545 | spin_unlock (&dum->lock); | 546 | spin_unlock (&dum->lock); |
546 | _req->actual = _req->length; | 547 | _req->actual = _req->length; |
547 | _req->status = 0; | 548 | _req->status = 0; |
548 | _req->complete (_ep, _req); | 549 | _req->complete (_ep, _req); |
549 | spin_lock (&dum->lock); | 550 | spin_lock (&dum->lock); |
550 | } | 551 | } else |
551 | list_add_tail (&req->queue, &ep->queue); | 552 | list_add_tail(&req->queue, &ep->queue); |
552 | spin_unlock_irqrestore (&dum->lock, flags); | 553 | spin_unlock_irqrestore (&dum->lock, flags); |
553 | 554 | ||
554 | /* real hardware would likely enable transfers here, in case | 555 | /* real hardware would likely enable transfers here, in case |