mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-09 01:47:20 -04:00
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:
committed by
Hans Verkuil
parent
2002ce4443
commit
66dcae2c3b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user