Commit 076c4d18 authored by Marek Vasut's avatar Marek Vasut Committed by Jonathan Cameron
Browse files

iio: light: noa1305: Fix up integration time look up



The current code is always iterating over two fields in the
noa1305_int_time_available array. Fix iteration limit, which
has to be halved to avoid out of bounds access in case the
value that is being looked up is not in the array.

Fixes: 025f23cf ("iio: light: noa1305: Make integration time configurable")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Suggested-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Link: https://patch.msgid.link/20240814191946.81386-1-marex@denx.de


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent c524fbca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment