iio: humidity: hdc100x: Use guard(mutex) to simplify code flow
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 31 Mar 2025 12:12:50 +0000 (13:12 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:09:59 +0000 (19:09 +0100)
commitd9e6b59e5ba942e7d804588e778bf0bdbbd6cca7
tree3c29cea36253fae5f5a2199fe7f1f084e7283b65
parent6c9dc1e8f296effd17f36a4653f6928c17a16dce
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>
drivers/iio/humidity/hdc100x.c