V4L/DVB (5869): Add check for valid control ID to v4l2_ctrl_next.
authorHans Verkuil <hverkuil@xs4all.nl>
Thu, 19 Jul 2007 07:53:36 +0000 (04:53 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 20 Jul 2007 20:35:53 +0000 (17:35 -0300)
commita46c5fbc6912c4e34cb7ded314249b639dc244a6
treebc247e83bf5da2c0c89dae099e1a75361c9d1ec7
parent3d58ffe2aa107df6db57f875dba5368960b17cde
V4L/DVB (5869): Add check for valid control ID to v4l2_ctrl_next.

If v4l2_ctrl_next is called without the V4L2_CTRL_FLAG_NEXT_CTRL then it
should check whether the passed control ID is valid and return 0 if it
isn't. Otherwise a for-loop over the control IDs will never end.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/v4l2-common.c