kernel_samsung_a53x/drivers/iio
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
..
accel iio: accel: mxc4005: Interrupt handling fixes 2024-11-19 11:32:48 +01:00
adc ad7780: fix division by zero in ad7780_write_raw() 2024-12-17 13:24:23 +01:00
addac
afe
amplifiers
buffer Revert "iio: buffer-dmaengine: fix releasing dma channel on error" 2024-11-24 00:23:38 +01:00
chemical iio: chemical: bme680: Fix sensor data read operation 2024-11-19 14:19:33 +01:00
common Revert "iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()" 2024-11-24 00:22:52 +01:00
dac Revert "iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig" 2024-11-24 00:22:52 +01:00
dummy
frequency
gyro
health
humidity
imu iio: imu: inv_icm42600: delete unneeded update watermark call 2024-11-19 14:19:04 +01:00
light iio: light: al3010: Fix an error handling path in al3010_probe() 2024-12-17 13:24:16 +01:00
magnetometer Revert "iio: magnetometer: ak8975: Fix reading for ak099xx sensors" 2024-11-24 00:23:01 +01:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: dps310: support negative temperature values 2024-11-19 12:27:03 +01:00
proximity Revert "iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig" 2024-11-24 00:22:52 +01:00
resolver
temperature
trigger
iio_core.h
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c Revert "iio: fix scale application in iio_convert_raw_to_processed_unlocked" 2024-11-24 00:23:38 +01:00
Kconfig
Makefile
TODO