]> git.baikalelectronics.ru Git - kernel.git/commit
iio: tsl2583: make array large enough
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2016 13:38:07 +0000 (16:38 +0300)
committerJonathan Cameron <jic23@kernel.org>
Thu, 24 Nov 2016 20:09:55 +0000 (20:09 +0000)
commit83239c326101244539af5c4fa3e25e364a9ecf98
tree3129d6649cecada623f07caf7583ad0412b00f61
parent8d5ca9ddf9996401a2aa0d3236ecbaf4250dd233
iio: tsl2583: make array large enough

This array is supposed to have 10 elements.  Smatch complains that with
the current code we can have n == max_ints and read beyond the end of
the array.

Fixes: 1995edbba10e ("staging: iio: TAOS tsl258x: Device driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/tsl2583.c