aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/videobuf-core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index a27e114cacef..ca67f80184bd 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -289,16 +289,18 @@ int videobuf_reqbufs(struct videobuf_queue *q,
289 return -EINVAL; 289 return -EINVAL;
290 } 290 }
291 291
292 mutex_lock(&q->lock);
292 if (q->streaming) { 293 if (q->streaming) {
293 dprintk(1,"reqbufs: streaming already exists\n"); 294 dprintk(1,"reqbufs: streaming already exists\n");
294 return -EBUSY; 295 retval = -EBUSY;
296 goto done;
295 } 297 }
296 if (!list_empty(&q->stream)) { 298 if (!list_empty(&q->stream)) {
297 dprintk(1,"reqbufs: stream running\n"); 299 dprintk(1,"reqbufs: stream running\n");
298 return -EBUSY; 300 retval = -EBUSY;
301 goto done;
299 } 302 }
300 303
301 mutex_lock(&q->lock);
302 count = req->count; 304 count = req->count;
303 if (count > VIDEO_MAX_FRAME) 305 if (count > VIDEO_MAX_FRAME)
304 count = VIDEO_MAX_FRAME; 306 count = VIDEO_MAX_FRAME;