[PATCH v3] iio: adc: stm32-adc: fix possible division by zero in processed channel

Jonathan Cameron jic23 at kernel.org
Sun Sep 20 17:15:45 PDT 2026


On Thu, 17 Sep 2026 09:37:27 +0300
Andy Shevchenko <andriy.shevchenko at intel.com> 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 at intel.com>
> 

Applied to the fixes-togreg branch of iio.git.
Note this may well not go upstream until next merge window.

Thanks,

Jonathan




More information about the linux-arm-kernel mailing list