android_kernel_samsung_msm8976/drivers/iio
Lars-Peter Clausen 8cbe65a685 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()").
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Change-Id: I309752003d76b0b586009ee1524779af8e63b87e
2019-08-15 21:02:28 +02:00
..
accel
adc iio:ad7793: Fix ad7785 product ID 2016-02-25 11:57:48 -08:00
amplifiers
common
dac iio: dac: mcp4725: set iio name property in sysfs 2016-02-25 11:57:48 -08:00
frequency
grip Import latest Samsung release 2017-04-18 03:43:52 +02:00
gyro Import latest Samsung release 2017-04-18 03:43:52 +02:00
imu iio: adis_lib: Initialize trigger before requesting interrupt 2019-07-27 21:46:10 +02:00
inv_test Import latest Samsung release 2017-04-18 03:43:52 +02:00
light Import latest Samsung release 2017-04-18 03:43:52 +02:00
magnetometer Import latest Samsung release 2017-04-18 03:43:52 +02:00
Kconfig Import latest Samsung release 2017-04-18 03:43:52 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00
buffer_cb.c
iio_core.h
iio_core_trigger.h
industrialio-buffer.c iio: Fix scan mask selection 2019-08-15 21:02:28 +02:00
industrialio-core.c Import latest Samsung release 2017-04-18 03:43:52 +02:00
industrialio-event.c
industrialio-trigger.c iio: Fix error handling in iio_trigger_attach_poll_func 2019-07-27 21:41:56 +02:00
industrialio-triggered-buffer.c
inkern.c
kfifo_buf.c iio:kfifo_buf: check for uint overflow 2019-07-27 21:52:28 +02:00