diff options
Diffstat (limited to 'drivers/media/usb/stk1160/stk1160-v4l.c')
-rw-r--r-- | drivers/media/usb/stk1160/stk1160-v4l.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index 77131fd..7ddbc02 100644 --- 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; |