]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to simplify error...
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 31 Mar 2025 12:12:42 +0000 (13:12 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 22 Apr 2025 18:09:58 +0000 (19:09 +0100)
commitfef6da136ef2835f18995a45f7b48847cff17b35
tree703f34bda3b7f05d0db8827faa4dfb6bf60ca2f7
parent36ee4794dd791e69f9402d5dc4a52968af36a936
iio: chemical: ccs811: Factor out handling of read of IIO_INFO_RAW to simplify error paths.

Factor out the implementation of this part of read_raw() and use
guard() to allow direct returns, simplifying both error and non error
paths.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://patch.msgid.link/20250331121317.1694135-3-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/ccs811.c