Hi, Here is my second version of the series... For more info, look at v1 cover. v1: * https://lore.kernel.org/all/20240221-iio-use-cleanup-magic-v1-0-f9c292666f26@xxxxxxxxxx/ v2: - Patch 1: * Respect ret value from call to ioctl() handler. --- Nuno Sa (5): iio: core: move to cleanup.h magic iio: events: move to the cleanup.h magic iio: trigger: move to the cleanup.h magic iio: buffer: iio: core: move to the cleanup.h magic iio: inkern: move to the cleanup.h magic drivers/iio/industrialio-buffer.c | 105 +++++++---------- drivers/iio/industrialio-core.c | 48 +++----- drivers/iio/industrialio-event.c | 42 +++---- drivers/iio/industrialio-trigger.c | 64 +++++------ drivers/iio/inkern.c | 224 ++++++++++++------------------------- 5 files changed, 171 insertions(+), 312 deletions(-) --- base-commit: 3cc5ebd3a2d6247aeba81873d6b040d5d87f7db1 change-id: 20240223-iio-use-cleanup-magic-9efe3b0a073d -- Thanks! - Nuno Sá