diff options
| author | Salah Triki <salah.triki@gmail.com> | 2026-09-03 12:43:09 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-09-30 18:59:55 +0100 |
| commit | d615210564205993e8f0e7ccb57cc2e66b7d5706 (patch) | |
| tree | 96e576139bdebd83abc601c25ec71e20882b0696 /scripts/include/hashtable.h | |
| parent | 9ec6ecc95dda6d91fa6f671cd972dd4bfc05ba38 (diff) | |
| download | linux-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/include/hashtable.h')
0 files changed, 0 insertions, 0 deletions
