summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ctrls.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-28 10:43:13 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:53:21 -0300
commit82a7c049449ec5a2194249da341ec8bde14e968b (patch)
tree689a71f2988b585608e41e7dee4d096c73c7ca22 /drivers/media/video/v4l2-ctrls.c
parent2330fb8242c3efc281ab8a2d3e22686023699955 (diff)
downloadtalos-op-linux-82a7c049449ec5a2194249da341ec8bde14e968b.tar.gz
talos-op-linux-82a7c049449ec5a2194249da341ec8bde14e968b.zip
[media] v4l2-ctrls: make manual_mode_value 8 bits and check against control range
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-ctrls.c')
-rw-r--r--drivers/media/video/v4l2-ctrls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index d084cea2b3ba..1bbaed6a5930 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -1264,6 +1264,7 @@ void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
v4l2_ctrl_cluster(ncontrols, controls);
WARN_ON(ncontrols <= 1);
+ WARN_ON(manual_val < master->minimum || manual_val > master->maximum);
master->is_auto = true;
master->manual_mode_value = manual_val;
master->flags |= V4L2_CTRL_FLAG_UPDATE;
OpenPOWER on IntegriCloud