kernel_samsung_a53x/drivers/iio/adc
Zicheng Qu d671478eee ad7780: fix division by zero in ad7780_write_raw()
commit c174b53e95adf2eece2afc56cd9798374919f99a upstream.

In the ad7780_write_raw() , val2 can be zero, which might lead to a
division by zero error in DIV_ROUND_CLOSEST(). The ad7780_write_raw()
is based on iio_info's write_raw. While val is explicitly declared that
can be zero (in read mode), val2 is not specified to be non-zero.

Fixes: 9085daa4abcc ("staging: iio: ad7780: add gain & filter gpio support")
Cc: stable@vger.kernel.org
Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Link: https://patch.msgid.link/20241028142027.1032332-1-quzicheng@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:24:23 +01:00
..
ab8500-gpadc.c
ad799x.c
ad7091r-base.c
ad7091r-base.h
ad7091r5.c
ad7124.c
ad7192.c
ad7266.c
ad7291.c
ad7292.c
ad7298.c
ad7476.c
ad7606.c
ad7606.h
ad7606_par.c
ad7606_spi.c
ad7766.c
ad7768-1.c
ad7780.c
ad7791.c
ad7793.c
ad7887.c
ad7923.c
ad7949.c
ad9467.c
ad_sigma_delta.c
adi-axi-adc.c
aspeed_adc.c
at91-sama5d2_adc.c
at91_adc.c
axp20x_adc.c
axp288_adc.c
bcm_iproc_adc.c
berlin2-adc.c
cc10001_adc.c
cpcap-adc.c
da9150-gpadc.c
dln2-adc.c
envelope-detector.c
ep93xx_adc.c
exynos_adc.c
fsl-imx25-gcq.c
hi8435.c
hx711.c
imx7d_adc.c
ina2xx-adc.c
ingenic-adc.c
intel_mrfld_adc.c
Kconfig
lp8788_adc.c
lpc18xx_adc.c
lpc32xx_adc.c
ltc2471.c
ltc2485.c
ltc2496.c
ltc2497-core.c
ltc2497.c
ltc2497.h
Makefile
max1027.c
max1118.c
max1241.c
max1363.c
max9611.c
max11100.c
mcp320x.c
mcp3422.c
mcp3911.c
men_z188_adc.c
meson_saradc.c
mp2629_adc.c
mt6577_auxadc.c
mxs-lradc-adc.c
nau7802.c
npcm_adc.c
palmas_gpadc.c
qcom-pm8xxx-xoadc.c
qcom-spmi-adc5.c
qcom-spmi-iadc.c
qcom-spmi-vadc.c
qcom-vadc-common.c
qcom-vadc-common.h
rcar-gyroadc.c
rn5t618-adc.c
rockchip_saradc.c
s2mps23_adc.c
s2mps25_adc.c
s2mpu13_adc.c
sc27xx_adc.c
sd_adc_modulator.c
spear_adc.c
stm32-adc-core.c
stm32-adc-core.h
stm32-adc.c
stm32-dfsdm-adc.c
stm32-dfsdm-core.c
stm32-dfsdm.h
stmpe-adc.c
stx104.c
sun4i-gpadc-iio.c
ti-adc081c.c
ti-adc084s021.c
ti-adc108s102.c
ti-adc128s052.c
ti-adc161s626.c
ti-adc0832.c
ti-adc12138.c
ti-ads124s08.c
ti-ads1015.c
ti-ads7950.c
ti-ads8344.c
ti-ads8688.c
ti-tlc4541.c
ti_am335x_adc.c
twl4030-madc.c
twl6030-gpadc.c
vf610_adc.c
viperboard_adc.c
xilinx-xadc-core.c
xilinx-xadc-events.c
xilinx-xadc.h