Re: [PATCH 04/12] iio: adc: rohm-bd79124: Catch regmap errors at measurement start/stop
From: Jonathan Cameron
Date: Sun Aug 16 2026 - 21:27:37 EST
On Mon, 10 Aug 2026 10:51:20 +0300
Matti Vaittinen <matti.vaittinen@xxxxxxxxx> wrote:
> From: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
>
> The bd79124_start_measurement() and bd79124_stop_measurement() ignore
> errors from the regmap reads, causing potential use of uninitialized
> stack variable when deciding whether the measurement is already
> started/stopped. The bd79124_stop_measurement() may also ignore failure
> to clear the sequencer state bits, which may make the hardware to ignore
> the setting and leave hardware and driver states out of sync.
>
> Check the return value and bail-out if error is detected.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> Fixes: 3f57a3b9ab74 ("iio: adc: Support ROHM BD79124 ADC")
Applied and marked for stable
Thanks,
J