drivers: sensors: lsm6dsl: Fix array overrun
This patch fixes an overrun detected via Coverity. The
lsm6dsl_odr_to_freq_val function takes an index as argument. If the
index is out of bounds, the expected behavior was to return the last
element of an array. The actual behavior was to overrun the array.
Fixes: #7482
Signed-off-by:
Andy Gross <andy.gross@linaro.org>
Loading
Please sign in to comment