[PATCH v3 02/13] iio: adc: at91-sama5d2_adc: use cleanup.h for NVMEM buffer
Andy Shevchenko
andriy.shevchenko at intel.com
Tue Jun 30 05:12:09 PDT 2026
On Tue, Jun 30, 2026 at 03:05:52PM +0530, Varshini Rajendran wrote:
> Use __free(kfree) cleanup helper for the NVMEM data buffer in
> at91_adc_temp_sensor_init() to simplify error handling paths.
>
> Since __free(kfree) requires a valid kfree-able pointer (not an
> ERR_PTR), store nvmem_cell_read() result in a temporary void pointer
> first, check for errors, then assign to the managed buffer.
LGTM,
Reviewed-by: Andy Shevchenko <andriy.shevchenko at intel.com>
--
With Best Regards,
Andy Shevchenko
More information about the linux-arm-kernel
mailing list