]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: max11410: Factor out writing of sampling frequency to simplify errro paths.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Feb 2025 14:16:25 +0000 (14:16 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Mar 2025 13:17:50 +0000 (13:17 +0000)
commit386c1d6e41cf2d6071b4d10500b34c89a5439380
tree783102fffd5ddd4bebd5de6c110faae547bae077
parent71dfa35f7bee255d041d234603fb7afe8c0ddcb4
iio: adc: max11410: Factor out writing of sampling frequency to simplify errro paths.

Introduce __max11410_write_samp_freq() helper and use guard() to avoid
need for manual unlock of the mutex. This allows direct returns and
simplifies the resulting error handling.

Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250217141630.897334-26-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max11410.c