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

Andy Shevchenko andriy.shevchenko at intel.com
Wed Sep 16 23:37:27 PDT 2026


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>

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list