diff options
Diffstat (limited to 'drivers/media/v4l2-core/videobuf2-core.c')
-rw-r--r-- | drivers/media/v4l2-core/videobuf2-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 5a5fb7f09b7b..a127925c9d61 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c | |||
@@ -1776,6 +1776,11 @@ static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type) | |||
1776 | return 0; | 1776 | return 0; |
1777 | } | 1777 | } |
1778 | 1778 | ||
1779 | if (!q->num_buffers) { | ||
1780 | dprintk(1, "streamon: no buffers have been allocated\n"); | ||
1781 | return -EINVAL; | ||
1782 | } | ||
1783 | |||
1779 | /* | 1784 | /* |
1780 | * If any buffers were queued before streamon, | 1785 | * If any buffers were queued before streamon, |
1781 | * we can now pass them to driver for processing. | 1786 | * we can now pass them to driver for processing. |