media: uvcvideo: uvc_ioctl_(g|s)_ext_ctrls: handle NoP case

If nothing needs to be done. Exit early.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Yunke Cao <yunkec@google.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20250203-uvc-roi-v17-7-5900a9fed613@chromium.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
Ricardo Ribalda
2025-02-03 11:55:43 +00:00
committed by Hans Verkuil
parent 2002ce4443
commit 66dcae2c3b

View File

@@ -1030,6 +1030,9 @@ static int uvc_ioctl_g_ext_ctrls(struct file *file, void *fh,
u32 which;
int ret;
if (!ctrls->count)
return 0;
switch (ctrls->which) {
case V4L2_CTRL_WHICH_DEF_VAL:
case V4L2_CTRL_WHICH_CUR_VAL:
@@ -1070,6 +1073,9 @@ static int uvc_ioctl_s_try_ext_ctrls(struct uvc_fh *handle,
unsigned int i;
int ret;
if (!ctrls->count)
return 0;
ret = uvc_ctrl_check_access(chain, ctrls, ioctl);
if (ret < 0)
return ret;