diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-06-26 13:00:49 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-06-26 17:28:31 +0200 |
commit | 23558d802a8e950783b956c457c002a612c09c2c (patch) | |
tree | b143e5542f01100b19b814b23239f37336e0e166 /drivers/media/test-drivers/vivid/vivid-vbi-cap.c | |
parent | 0fd7c0c2c156270dceb8c15fad3120cdce03e539 (diff) | |
download | lwn-23558d802a8e950783b956c457c002a612c09c2c.tar.gz lwn-23558d802a8e950783b956c457c002a612c09c2c.zip |
media: vivid: fix CREATE_BUFS support in queue_setup()
While queue_setup was correct for CREATE_BUFS support for
video devices, for VBI, SDR and touch devices it was wrong.
This was found after adding new v4l2-compliance tests.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/test-drivers/vivid/vivid-vbi-cap.c')
-rw-r--r-- | drivers/media/test-drivers/vivid/vivid-vbi-cap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c index 3840b3a664ac..95387d57eb93 100644 --- a/drivers/media/test-drivers/vivid/vivid-vbi-cap.c +++ b/drivers/media/test-drivers/vivid/vivid-vbi-cap.c @@ -132,6 +132,8 @@ static int vbi_cap_queue_setup(struct vb2_queue *vq, if (!vivid_is_sdtv_cap(dev)) return -EINVAL; + if (*nplanes) + return sizes[0] < size ? -EINVAL : 0; sizes[0] = size; *nplanes = 1; |