diff options
author | 2024-10-28 14:20:27 +0000 | |
---|---|---|
committer | 2024-10-31 21:07:26 +0000 | |
commit | c174b53e95adf2eece2afc56cd9798374919f99a (patch) | |
tree | c01543a01cd185cab563e55af7c6b1f007af1de5 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | iio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer (diff) | |
download | wireguard-linux-c174b53e95adf2eece2afc56cd9798374919f99a.tar.xz wireguard-linux-c174b53e95adf2eece2afc56cd9798374919f99a.zip |
ad7780: fix division by zero in ad7780_write_raw()
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions