media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
authorRicardo Ribalda <ribalda@chromium.org>
Fri, 18 Jun 2021 12:29:05 +0000 (14:29 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:46 +0000 (10:07 +0200)
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.

Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/uvc/uvc_v4l2.c

index 6acb8013de08bbd0866fa3825914e6733303b814..102fa39a161561b393af211ac97b43546c10586d 100644 (file)
@@ -1101,10 +1101,6 @@ static int uvc_ioctl_s_try_ext_ctrls(struct uvc_fh *handle,
        unsigned int i;
        int ret;
 
-       /* Default value cannot be changed */
-       if (ctrls->which == V4L2_CTRL_WHICH_DEF_VAL)
-               return -EINVAL;
-
        ret = uvc_ctrl_begin(chain);
        if (ret < 0)
                return ret;