Re: [PATCH v3] iio: adc: stm32-adc: fix possible division by zero in processed channel
From: Andy Shevchenko
Date: Thu Sep 17 2026 - 02:39:57 EST
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>
--
With Best Regards,
Andy Shevchenko