summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2013-02-13 16:02:23 -0700
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-24 01:27:23 +0100
commit12e48bcd7708be9e21c6d7ad61b806d90afefbfa (patch)
tree2a34b5f09842d4c816d9190fdd2adac1bc59e3a2 /drivers
parent6706d540ce88af1df22824daf0213e76e686d31e (diff)
mxc_v4l2_capture: fix VIDIOC_ENUMSTD, return -EINVAL if index > 0
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 8416153781d90d7153769310ea7b250166460f86) (cherry picked from commit bc387b6fd0e45132e951eaa79af1bfdc4c196ed0)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/mxc/capture/mxc_v4l2_capture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
index 3d7adecaa325..f6507d4a52a8 100644
--- a/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/platform/mxc/capture/mxc_v4l2_capture.c
@@ -2250,6 +2250,10 @@ static long mxc_v4l_do_ioctl(struct file *file,
case VIDIOC_ENUMSTD: {
struct v4l2_standard *e = arg;
pr_debug(" case VIDIOC_ENUMSTD\n");
+ if (e->index > 0) {
+ retval = -EINVAL;
+ break;
+ }
*e = cam->standard;
break;
}