iio: imu: st_lsm6dsx: Factor out parts of st_lsm6dsx_shub_write_raw() to allow direct returns

By factoring out all the code that occurs with direct mode claimed
to a helper function, that helper function can directly return simplifying
code flow.

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://patch.msgid.link/20250331121317.1694135-19-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jonathan Cameron 2025-03-31 13:12:58 +01:00
commit ee56bbcaad