projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
619200d
)
media: core: v4l2-ioctl.c: use is_valid_ioctl()
author
Hans Verkuil
<hverkuil-cisco@xs4all.nl>
Wed, 7 Feb 2024 09:03:30 +0000
(10:03 +0100)
committer
Hans Verkuil
<hverkuil-cisco@xs4all.nl>
Fri, 16 Feb 2024 10:46:32 +0000
(11:46 +0100)
In most cases the is_valid_ioctl() macro is used to check if an ioctl is
valid, except in one place. Use it there as well as it makes the code
easier to read.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/v4l2-core/v4l2-ioctl.c
patch
|
blob
|
history
diff --git
a/drivers/media/v4l2-core/v4l2-ioctl.c
b/drivers/media/v4l2-core/v4l2-ioctl.c
index 33076af4dfdbd4d6298085801cf23ebc353225ae..6e7b8b682d13f4b3c739dafe962ee7a3006c4772 100644
(file)
--- a/
drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/
drivers/media/v4l2-core/v4l2-ioctl.c
@@
-3028,7
+3028,7
@@
static long __video_do_ioctl(struct file *file,
if (v4l2_is_known_ioctl(cmd)) {
info = &v4l2_ioctls[_IOC_NR(cmd)];
- if (!
test_bit(_IOC_NR(cmd), vfd->valid_ioctls
) &&
+ if (!
is_valid_ioctl(vfd, cmd
) &&
!((info->flags & INFO_FL_CTRL) && vfh && vfh->ctrl_handler))
goto done;