diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-09-04 11:25:44 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2013-09-04 11:25:44 -0600 |
commit | 3bc4f3993b93dbf1f6402e2034a2e20eb07db807 (patch) | |
tree | 592283e59e121b76355836295d6016fe33cfc5d1 /drivers/usb/gadget/uvc_queue.c | |
parent | 17638db1b88184d8895f3f4551c936d7480a1d3f (diff) | |
parent | cb3e4330e697dffaf3d9cefebc9c7e7d39c89f2e (diff) |
Merge remote branch 'origin/master' into next-merge
Diffstat (limited to 'drivers/usb/gadget/uvc_queue.c')
-rw-r--r-- | drivers/usb/gadget/uvc_queue.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c index e6170478ea9..0bb5d50075d 100644 --- a/drivers/usb/gadget/uvc_queue.c +++ b/drivers/usb/gadget/uvc_queue.c @@ -193,12 +193,16 @@ static int uvc_queue_buffer(struct uvc_video_queue *queue, mutex_lock(&queue->mutex); ret = vb2_qbuf(&queue->queue, buf); + if (ret < 0) + goto done; + spin_lock_irqsave(&queue->irqlock, flags); ret = (queue->flags & UVC_QUEUE_PAUSED) != 0; queue->flags &= ~UVC_QUEUE_PAUSED; spin_unlock_irqrestore(&queue->irqlock, flags); - mutex_unlock(&queue->mutex); +done: + mutex_unlock(&queue->mutex); return ret; } |