Allocate the memory with scoped/cleanup.h to reduce error handling and make the code a bit simpler. Best regards, Krzysztof --- Krzysztof Kozlowski (6): iio: accel: bma400: simplify with cleanup.h iio: adc: ad7280a: simplify with cleanup.h iio: adc: at91: simplify with cleanup.h iio: adc: max1363: simplify with cleanup.h iio: adc: ti-tsc2046: simplify with cleanup.h iio: adc: ad5755: drop redundant devm_kfree() drivers/iio/accel/bma400_core.c | 11 +++++------ drivers/iio/adc/ad7280a.c | 10 ++++------ drivers/iio/adc/at91_adc.c | 13 +++++-------- drivers/iio/adc/max1363.c | 34 +++++++++++++--------------------- drivers/iio/adc/ti-tsc2046.c | 29 ++++++++++++----------------- drivers/iio/dac/ad5755.c | 1 - 6 files changed, 39 insertions(+), 59 deletions(-) --- base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233 change-id: 20240705-cleanup-h-iio-c90ca38865a4 Best regards, -- Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>