projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4bca74
)
[media] stk1160: Check *nplanes in queue_setup
author
Helen Fornazier
<
[email protected]
>
Tue, 10 May 2016 03:06:14 +0000
(
00:06
-0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Tue, 28 Jun 2016 11:05:09 +0000
(08:05 -0300)
If *nplanes is not zero, it should use the requested size if valid
Signed-off-by: Helen Koike <
[email protected]
>
Signed-off-by: Hans Verkuil <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/usb/stk1160/stk1160-v4l.c
patch
|
blob
|
history
diff --git
a/drivers/media/usb/stk1160/stk1160-v4l.c
b/drivers/media/usb/stk1160/stk1160-v4l.c
index 77131fd614a5e763e4fcefedfed81a1154889b00..7ddbc0274f127eed30936687d7471c77382a267c 100644
(file)
--- a/
drivers/media/usb/stk1160/stk1160-v4l.c
+++ b/
drivers/media/usb/stk1160/stk1160-v4l.c
@@
-680,6
+680,9
@@
static int queue_setup(struct vb2_queue *vq,
*nbuffers = clamp_t(unsigned int, *nbuffers,
STK1160_MIN_VIDEO_BUFFERS, STK1160_MAX_VIDEO_BUFFERS);
+ if (*nplanes)
+ return sizes[0] < size ? -EINVAL : 0;
+
/* This means a packed colorformat */
*nplanes = 1;