]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: chemical: scd30: Use guard(mutex) to allow early returns
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Feb 2025 18:05:59 +0000 (18:05 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Feb 2025 12:57:30 +0000 (12:57 +0000)
commit5feb5532870fbced5d6f450b8061a33f461b88ca
tree94527f058ca558ab9bb03e1a3725fa6386ebe2eb
parentd795e38df4b7ebac1072bbf7d8a5500c1ea83332
iio: chemical: scd30: Use guard(mutex) to allow early returns

Auto cleanup based release of the lock allows for simpler code flow in a
few functions with large multiplexing style switch statements and no
common operations following the switch.

Suggested-by: David Lechner <dlechner@baylibre.com>
Cc: Tomasz Duszynski <tomasz.duszynski@octakon.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250209180624.701140-3-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/scd30_core.c