diff options
| author | Rosen Penev <rosenp@gmail.com> | 2026-03-03 20:18:43 -0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-14 12:10:21 +0000 |
| commit | 8d8613036491f1057b1eeca4e4b2c41d8d465a63 (patch) | |
| tree | 27921a1df5d085d6e31a1b6b562d9e89ff8c64a3 /drivers | |
| parent | d4243cb08a272b6cc0f7c8293f9c7e128b51795c (diff) | |
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 <rosenp@gmail.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iio/adc/at91-sama5d2_adc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index 69bb49434f90..255970b2e747 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); |
