]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB: uvcvideo: Return -ERANGE when setting a control to an out-of-range menu...
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 21 Jan 2010 19:53:11 +0000 (16:53 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:11:04 +0000 (15:11 -0300)
commit52f0f26dd0106f95d40bcb20fade3c5ef09235d7
tree7ecaed2d419ac528b39b4702ca493dd71afbfd30
parent5983de85d530f8672c292712ff8c1d077955f211
V4L/DVB: uvcvideo: Return -ERANGE when setting a control to an out-of-range menu index

The V4L2 specification states that out of bounds control values must
either be clamped to the valid range or result in a -ERANGE error code.

Fix the driver to return -ERANGE instead of -EINVAL when setting a menu
control to an invalid value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_ctrl.c