iio: humidity: hdc100x: Use guard(mutex) to simplify code flow

By using autoreleasing on the lock a number of paths can use
direct returns allow earlier exit from functions.

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