Merge "input: qcom-hv-haptics: fix out of bound of FIFO samples array"

This commit is contained in:
qctecmdr 2020-12-10 06:46:25 -08:00 • committed by Gerrit - the friendly Code Review server
commit 7c3f466a36

View file

@ -675,7 +675,7 @@ static int get_fifo_play_length_us(struct fifo_cfg *fifo, u32 t_lra_us)
if (!fifo)
return -EINVAL;
for (i = fifo->num_s; i > 0; i--)
for (i = fifo->num_s - 1; i > 0; i--)
if (fifo->samples[i] != 0)
break;