|
@@ -1431,8 +1431,10 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
ctrl = uvc_find_control(chain, xctrl->id, &mapping);
|
|
ctrl = uvc_find_control(chain, xctrl->id, &mapping);
|
|
- if (ctrl == NULL || (ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR) == 0)
|
|
|
|
|
|
+ if (ctrl == NULL)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
+ if (!(ctrl->info.flags & UVC_CTRL_FLAG_SET_CUR))
|
|
|
|
+ return -EACCES;
|
|
|
|
|
|
/* Clamp out of range values. */
|
|
/* Clamp out of range values. */
|
|
switch (mapping->v4l2_type) {
|
|
switch (mapping->v4l2_type) {
|