v4l: Fix a use-before-set in the control framework
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 7 Dec 2010 11:57:25 +0000 (12:57 +0100)
committerJason Kridner <jkridner@beagleboard.org>
Thu, 10 Mar 2011 23:38:31 +0000 (17:38 -0600)
commit5b745b42a228744ed656bff9abff5a36b9832931
tree9b77ea97f2593593c8c272704741a87b7567ca7d
parent7cc282fbe15654aee8e7f16e6c952b5abb166d30
v4l: Fix a use-before-set in the control framework

v4l2_queryctrl sets the step value based on the control type. That would
be fine if it used the control type stored in the V4L2 kernel control
object, not the one stored in the userspace ioctl structure that has
just been memset to 0. Fix this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/video/v4l2-ctrls.c