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>
This commit is contained in:
Jonathan Cameron 2025-02-17 14:16:17 +00:00
commit f1a4a2e6b8