Re: [PATCH v2] iio: adc: meson-saradc: fix calibration buffer leak on error

From: Jonathan Cameron

Date: Tue Apr 28 2026 - 13:21:51 EST


On Mon, 27 Apr 2026 19:26:31 +0800
Felix Gu <ustc.gu@xxxxxxxxx> 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.
>
> Fix this by adding missing kfree(buf).
>
> Fixes: d6f2eac64403 ("iio: adc: meson: no devm for nvmem_cell_get")
> Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
Applied. Thanks

J