]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: backend: use __free(fwnode_handle) for automatic cleanup
authorAntoniu Miclaus <antoniu.miclaus@analog.com>
Sat, 21 Mar 2026 10:01:51 +0000 (12:01 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2026 12:02:24 +0000 (12:02 +0000)
commit0dc1147b4c9d4a77e8e4942b92ebf398aff1e91d
tree013883fd695e1f560f50359f939ef759652105f4
parente7ecdcbc16f049edfa32be01b34ec8dc8e3c51ce
iio: backend: use __free(fwnode_handle) for automatic cleanup

Convert __devm_iio_backend_fwnode_get() to use the __free(fwnode_handle)
cleanup attribute for the fwnode_back variable, removing the need for
manual fwnode_handle_put() calls. Move the declaration closer to its
first use, narrowing its scope.

No functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-backend.c