summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/parallel-perf.py
diff options
context:
space:
mode:
authorZicheng Qu <quzicheng@huawei.com>2024-10-22 16:43:30 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-10-24 20:30:47 +0300
commitefa353ae1b0541981bc96dbf2e586387d0392baa (patch)
tree13ef6f459de94a966d1418624aa271f3bb17e4ce /tools/perf/scripts/python/parallel-perf.py
parent6bd301819f8f69331a55ae2336c8b111fc933f3d (diff)
downloadlinux-efa353ae1b0541981bc96dbf2e586387d0392baa.tar.xz
iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()
In the ad7124_write_raw() function, parameter val can potentially be zero. This may lead to a division by zero when DIV_ROUND_CLOSEST() is called within ad7124_set_channel_odr(). The ad7124_write_raw() function is invoked through the sequence: iio_write_channel_raw() -> iio_write_channel_attribute() -> iio_channel_write(), with no checks in place to ensure val is non-zero. Cc: stable@vger.kernel.org Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels") Signed-off-by: Zicheng Qu <quzicheng@huawei.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20241022134330.574601-1-quzicheng@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions