iio: inkern: move to the cleanup.h magic
authorNuno Sa <nuno.sa@analog.com>
Thu, 29 Feb 2024 15:10:28 +0000 (16:10 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 25 Mar 2024 20:10:14 +0000 (20:10 +0000)
commit3092bde731ca8c499fa8a4a9e987904abfbf55bf
treec86dba86fdcea63a502bc89c125d55a6fe2a11ef
parent714b5b4c2c2431d830f0d5e9e85282beef40c747
iio: inkern: move to the cleanup.h magic

Use the new cleanup magic for handling mutexes in IIO. This allows us to
greatly simplify some code paths.

While at it, also use __free(kfree) where allocations are done and drop
obvious comment in iio_channel_read_min().

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240229-iio-use-cleanup-magic-v3-4-c3d34889ae3c@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/inkern.c