[PATCH v2] iio: adc: meson-saradc: fix calibration buffer leak on error
Jonathan Cameron
jic23 at kernel.org
Tue Apr 28 10:05:47 PDT 2026
On Mon, 27 Apr 2026 19:26:31 +0800
Felix Gu <ustc.gu at gmail.com> 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 at gmail.com>
Applied. Thanks
J
More information about the linux-amlogic
mailing list