iio: adc: stm32: add check on clock rate
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 18 Oct 2017 11:40:12 +0000 (13:40 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Oct 2017 16:52:20 +0000 (17:52 +0100)
commitf66f18e99a253f5cf8c1cf7f2910b7ddcee92970
tree0f640a92192ef15080fbefb37b7bdfb0879b5c0f
parent3a069904282d621fc65ec37713f41f69ba63645f
iio: adc: stm32: add check on clock rate

Add check on STM32 ADC clock rate to report an explicit error.
This may avoid division by 0 later in stm32-adc driver.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-adc-core.c