diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-01-11 14:22:39 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-28 22:37:11 +0100 |
commit | b41869711586b047c18435ba84baf334918bae01 (patch) | |
tree | 36de334462c207e4140b25b2f26df72a036e710a /drivers/media/usb | |
parent | [media] em28xx: write output frame resolution to regs 0x34+0x35 for em25xx fa... (diff) | |
download | linux-b41869711586b047c18435ba84baf334918bae01.tar.xz linux-b41869711586b047c18435ba84baf334918bae01.zip |
[media] uvcvideo: Return -EINVAL when setting a menu control to an invalid value
-ERANGE is the right error code when the value is outside of the menu
range, but -EINVAL must be reported for invalid values inside the range.
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>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/uvc/uvc_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 61e28dec991d..a2f4501c23ca 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1487,7 +1487,7 @@ int uvc_ctrl_set(struct uvc_video_chain *chain, step = mapping->get(mapping, UVC_GET_RES, uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES)); if (!(step & value)) - return -ERANGE; + return -EINVAL; } break; |