]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: adc: ad7793: Factor out core of ad7793_write_raw() to simplify error handling
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Feb 2025 14:16:17 +0000 (14:16 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 4 Mar 2025 13:17:49 +0000 (13:17 +0000)
commitf1a4a2e6b85ef9c76868173b87b19e2fa3107cd1
tree95533c5f219cbe879ae6ddaf09dc00f07e3f1192
parent85e840ced7a89cbd7c401f299eb337db5f41acd0
iio: adc: ad7793: Factor out core of ad7793_write_raw() to simplify error handling

Factor out everything under the direct mode claim allowing direct returns
in error paths.  Switch sense of matching in the loop and use a continue
to reduce code indent and improve readability.

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