summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@gmail.com>2026-09-03 12:43:09 +0100
committerJonathan Cameron <jonathan.cameron@oss.qualcomm.com>2026-09-30 18:59:55 +0100
commitd615210564205993e8f0e7ccb57cc2e66b7d5706 (patch)
tree96e576139bdebd83abc601c25ec71e20882b0696 /scripts
parent9ec6ecc95dda6d91fa6f671cd972dd4bfc05ba38 (diff)
downloadlinux-stable-d615210564205993e8f0e7ccb57cc2e66b7d5706.tar.gz
linux-stable-d615210564205993e8f0e7ccb57cc2e66b7d5706.zip
iio: adc: ad4030: fix invalid oversampling_ratio validation
In ad4030_set_avg_frame_len(), the logarithm is calculated before input validation. Passing zero or negative values leads to an undefined result from ilog2(). Validate that the input is strictly positive prior to computing its logarithm. Fixes: 949abd1ca5a4 ("iio: adc: ad4030: add averaging support") Assisted-by: LLM Signed-off-by: Salah Triki <salah.triki@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions