[media] uvcvideo: Set error_idx properly for extended controls API failures
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 28 Aug 2012 21:38:58 +0000 (18:38 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 28 Nov 2012 12:24:48 +0000 (10:24 -0200)
commitf0ed2ce840b3a59b587e8aa398538141a86e9588
tree8a17d0bd6229e8a29d01a43d24d3fdfecb03d49a
parente9de051666a42dc7866267f85869170bcc6b957a
[media] uvcvideo: Set error_idx properly for extended controls API failures

When one of the requested controls doesn't exist the error_idx field
must reflect that situation. For G_EXT_CTRLS and S_EXT_CTRLS, error_idx
must be set to the control count. For TRY_EXT_CTRLS, it must be set to
the index of the unexisting control.
This issue was found by the v4l2-compliance tool.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/uvc/uvc_ctrl.c
drivers/media/usb/uvc/uvc_v4l2.c