projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[media] vb2: Check if there are buffers before streamon
[deliverable/linux.git]
/
drivers
/
media
/
v4l2-core
/
videobuf2-core.c
diff --git
a/drivers/media/v4l2-core/videobuf2-core.c
b/drivers/media/v4l2-core/videobuf2-core.c
index 8e6695c9b0e22369bcc7e6a82690136a0ee0ed12..3c07534e9ba53234c473149d6070c44df432004c 100644
(file)
--- a/
drivers/media/v4l2-core/videobuf2-core.c
+++ b/
drivers/media/v4l2-core/videobuf2-core.c
@@
-1832,6
+1832,11
@@
static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
return -EINVAL;
}
+ 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.
This page took
0.023946 seconds
and
5
git commands to generate.