From: Rosen Penev Date: Wed, 4 Mar 2026 04:18:43 +0000 (-0800) Subject: iio: adc: at91-sama5d2_adc: no devm for nvmem_cell_get X-Git-Tag: v7.1-rc1~17^2~120^2~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d8613036491f1057b1eeca4e4b2c41d8d465a63;p=thirdparty%2Fkernel%2Fstable.git iio: adc: at91-sama5d2_adc: no devm for nvmem_cell_get There is absolutely no reason to pospone cleanup of this post driver removal. Just do it immediately. Signed-off-by: Rosen Penev Reviewed-by: Nuno Sá Reviewed-by: Eugen Hristev Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index 69bb49434f90c..255970b2e7479 100644 --- a/drivers/iio/adc/at91-sama5d2_adc.c +++ b/drivers/iio/adc/at91-sama5d2_adc.c @@ -2259,7 +2259,7 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st, return 0; /* Get the calibration data from NVMEM. */ - temp_calib = devm_nvmem_cell_get(dev, "temperature_calib"); + temp_calib = nvmem_cell_get(dev, "temperature_calib"); if (IS_ERR(temp_calib)) { ret = PTR_ERR(temp_calib); if (ret != -ENOENT) @@ -2268,6 +2268,7 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st, } buf = nvmem_cell_read(temp_calib, &len); + nvmem_cell_put(temp_calib); if (IS_ERR(buf)) { dev_err(dev, "Failed to read calibration data!\n"); return PTR_ERR(buf);