]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: adv7180: Only validate format in s_std
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 28 Aug 2025 16:06:53 +0000 (18:06 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 4 Sep 2025 08:06:13 +0000 (10:06 +0200)
commitdf2cd073da6ed286e26f88a2f2a6a51140cbf56b
treeaa2921f0e0083ba1adfe552fefd2c61d15a14fae
parent46c1e7814d1c3310ef23c01ed1a582ef0c8ab1d2
media: adv7180: Only validate format in s_std

The .s_std callback should not write the new format directly do the
device, it should only store it and have it applied by .s_stream.

As .s_stream already calls adv7180_program_std() all that is needed
is to check the standard is valid, and store it for .s_stream to
program.

While at it add a scoped guard to simplify the error handling.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/i2c/adv7180.c