Skip to content

Commit

Permalink
[media] uvcvideo: Return -EINVAL when setting a menu control to an in…
Browse files Browse the repository at this point in the history
…valid 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>
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Mar 28, 2013
1 parent 1e2e908 commit b418697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/uvc/uvc_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b418697

Please sign in to comment.