[PATCH] iio: adc: meson-saradc: fix calibration buffer leak on error
Andy Shevchenko
andriy.shevchenko at intel.com
Mon Apr 27 00:44:58 PDT 2026
On Sun, Apr 26, 2026 at 12:07:24AM +0800, Felix Gu wrote:
> meson_sar_adc_temp_sensor_init() allocates a buffer with
> nvmem_cell_read(), but the old code leaked it if
> syscon_regmap_lookup_by_phandle() failed.
> Switch buf to __free(kfree) so all return paths release it.
__free() is defined in cleanup.h which is missing in the driver. Please add the
include to it.
--
With Best Regards,
Andy Shevchenko
More information about the linux-amlogic
mailing list