]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commite8eb43a256e813662ce6e8226e346c785515dc4c
tree8a17d0bd6229e8a29d01a43d24d3fdfecb03d49a
parent7d35ac0908fa5de6ad7225b0660b32a09a56659e
[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