aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
diff options
context:
space:
mode:
authorZicheng Qu <[email protected]>2024-10-22 13:43:30 +0000
committerJonathan Cameron <[email protected]>2024-10-24 17:30:47 +0000
commitefa353ae1b0541981bc96dbf2e586387d0392baa (patch)
tree13ef6f459de94a966d1418624aa271f3bb17e4ce /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
parentstaging: iio: frequency: ad9832: fix division by zero in ad9832_calc_freqreg() (diff)
downloadkernel-efa353ae1b0541981bc96dbf2e586387d0392baa.tar.gz
kernel-efa353ae1b0541981bc96dbf2e586387d0392baa.zip
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: [email protected] Fixes: 7b8d045e497a ("iio: adc: ad7124: allow more than 8 channels") Signed-off-by: Zicheng Qu <[email protected]> Reviewed-by: Nuno Sa <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions