]> Pileus Git - ~andy/linux/blobdiff - drivers/media/v4l2-core/videobuf2-core.c
Merge remote-tracking branches 'spi/fix/ath79', 'spi/fix/atmel', 'spi/fix/coldfire...
[~andy/linux] / drivers / media / v4l2-core / videobuf2-core.c
index 5a5fb7f09b7bd1857bc7e660c24d7e1b95117dc6..a127925c9d61da6f92a93fb49d6e6f01f03e0e25 100644 (file)
@@ -1776,6 +1776,11 @@ static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
                return 0;
        }
 
+       if (!q->num_buffers) {
+               dprintk(1, "streamon: no buffers have been allocated\n");
+               return -EINVAL;
+       }
+
        /*
         * If any buffers were queued before streamon,
         * we can now pass them to driver for processing.