]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: v4l2-ctrls: Move v4l2_fh retrieval after V4L2_FL_USES_V4L2_FH check
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 10 Aug 2025 01:30:12 +0000 (04:30 +0300)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Wed, 13 Aug 2025 06:33:45 +0000 (08:33 +0200)
commit5410bad3326f3557a7d996b19fa4adc2c70b3c0e
tree63da4814f99fa1b5cec589a683c0903af0372a5a
parent5c17eace98188614ab03b25784a39b9a9cda6e35
media: v4l2-ctrls: Move v4l2_fh retrieval after V4L2_FL_USES_V4L2_FH check

The v4l2_ctrl_log_status() function retrieves the v4l2_fh from the file
with file_to_v4l2_fh() before checking the V4L2_FL_USES_V4L2_FH to see
if the device makes use of v4l2_fh. While this doesn't cause any
practical issue given the current implementation of file_to_v4l2_fh(),
it is cleaner to retrieve the v4l2_fh after checking the flag. This
could prevent future issues if the implementation of file_to_v4l2_fh()
changes.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls-api.c