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: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com> Link: https://lore.kernel.org/r/YzFsjY3xLHUQMjVr@kiliSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment