summaryrefslogtreecommitdiffstats
path: root/drivers/iio/gyro/adis16130.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2019-02-20 17:11:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 09:36:35 +0200
commit36971130bb2f815fddae17cfe02ae5fed9b3ff56 (patch)
tree34e5aa3076573c11212e6341925ad4c923c8cac5 /drivers/iio/gyro/adis16130.c
parent0e47edde91325efde88e937e1ccc5883c32b5a31 (diff)
downloadlinux-stable-36971130bb2f815fddae17cfe02ae5fed9b3ff56.tar.gz
linux-stable-36971130bb2f815fddae17cfe02ae5fed9b3ff56.tar.bz2
linux-stable-36971130bb2f815fddae17cfe02ae5fed9b3ff56.zip
iio: Fix scan mask selection
commit 20ea39ef9f2f911bd01c69519e7d69cfec79fde3 upstream. The trialmask is expected to have all bits set to 0 after allocation. Currently kmalloc_array() is used which does not zero the memory and so random bits are set. This results in random channels being enabled when they shouldn't. Replace kmalloc_array() with kcalloc() which has the same interface but zeros the memory. Note the fix is actually required earlier than the below fixes tag, but will require a manual backport due to move from kmalloc to kmalloc_array. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Fixes commit 057ac1acdfc4 ("iio: Use kmalloc_array() in iio_scan_mask_set()"). Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/gyro/adis16130.c')
0 files changed, 0 insertions, 0 deletions