Commit 8632eeca authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Xie XiuQi
Browse files

iio:adc:ti-ads124s08: Fix buffer being too long.



stable inclusion
from stable-5.10.4
commit c834798d783e08d8bbe675035b6b8880fb3b0146
bugzilla: 46903

--------------------------------

commit b0bd27f0 upstream.

The buffer is expressed as a u32 array, yet the extra space for
the s64 timestamp was expressed as sizeof(s64)/sizeof(u16).
This will result in 2 extra u32 elements.
Fix by dividing by sizeof(u32).

Fixes: e717f8c6 ("iio: adc: Add the TI ads124s08 ADC code")
Signed-off-by: default avatarJonathan <Cameron&lt;Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200920112742.170751-8-jic23@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent e168d0d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment