Re: [PATCH v3] iio: adc: stm32-adc: fix possible division by zero in processed channel
From: Jonathan Cameron
Date: Sun Sep 20 2026 - 20:16:04 EST
On Thu, 17 Sep 2026 09:37:27 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Sep 16, 2026 at 07:15:04PM +0200, Fabrice Gasnier wrote:
> > In case the conversion has failed or returned zero, processing *val
> > can lead to a division by zero. Need to check for errors, or converted
> > value is zero, before processing the data. In case the converted value
> > is zero, e.g. the Vrefint channel, this should be considered as invalid
> > in all cases.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
Applied to the fixes-togreg branch of iio.git.
Note this may well not go upstream until next merge window.
Thanks,
Jonathan