diff options
| -rw-r--r-- | drivers/usb/gadget/function/f_hid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 75b113a5b25c..f3816a5c861e 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c | |||
| @@ -391,20 +391,20 @@ try_again: | |||
| 391 | req->complete = f_hidg_req_complete; | 391 | req->complete = f_hidg_req_complete; |
| 392 | req->context = hidg; | 392 | req->context = hidg; |
| 393 | 393 | ||
| 394 | spin_unlock_irqrestore(&hidg->write_spinlock, flags); | ||
| 395 | |||
| 394 | status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC); | 396 | status = usb_ep_queue(hidg->in_ep, req, GFP_ATOMIC); |
| 395 | if (status < 0) { | 397 | if (status < 0) { |
| 396 | ERROR(hidg->func.config->cdev, | 398 | ERROR(hidg->func.config->cdev, |
| 397 | "usb_ep_queue error on int endpoint %zd\n", status); | 399 | "usb_ep_queue error on int endpoint %zd\n", status); |
| 398 | goto release_write_pending_unlocked; | 400 | goto release_write_pending; |
| 399 | } else { | 401 | } else { |
| 400 | status = count; | 402 | status = count; |
| 401 | } | 403 | } |
| 402 | spin_unlock_irqrestore(&hidg->write_spinlock, flags); | ||
| 403 | 404 | ||
| 404 | return status; | 405 | return status; |
| 405 | release_write_pending: | 406 | release_write_pending: |
| 406 | spin_lock_irqsave(&hidg->write_spinlock, flags); | 407 | spin_lock_irqsave(&hidg->write_spinlock, flags); |
| 407 | release_write_pending_unlocked: | ||
| 408 | hidg->write_pending = 0; | 408 | hidg->write_pending = 0; |
| 409 | spin_unlock_irqrestore(&hidg->write_spinlock, flags); | 409 | spin_unlock_irqrestore(&hidg->write_spinlock, flags); |
| 410 | 410 | ||
