Message ID | 1283756030-28634-5-git-send-email-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | RFC |
Headers | show |
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index ce1595b..2cdf8ed 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -725,6 +725,17 @@ int videobuf_streamon(struct videobuf_queue *q) int retval; mutex_lock(&q->vb_lock); + + if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT + || q->type == V4L2_BUF_TYPE_VBI_OUTPUT + || q->type == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) { + if (list_empty(&q->stream)) { + dprintk(1, "streamon: no output buffers queued\n"); + retval = -EINVAL; + goto done; + } + } + retval = -EBUSY; if (q->reading) goto done;