Skip to content
Commit 7578847b authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron
Browse files

iio: adc: mcp3911: fix sizeof() vs ARRAY_SIZE() bug



This code uses sizeof() instead of ARRAY_SIZE() so it reads beyond the
end of the mcp3911_osr_table[] array.

Fixes: 6d965885 ("iio: adc: mcp3911: add support for oversampling ratio")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Link: https://lore.kernel.org/r/YzFsjY3xLHUQMjVr@kili


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