]> Git Repo - linux.git/commit
iio: Fix scan mask selection
authorLars-Peter Clausen <[email protected]>
Wed, 20 Feb 2019 15:11:32 +0000 (17:11 +0200)
committerJonathan Cameron <[email protected]>
Sat, 9 Mar 2019 16:55:06 +0000 (16:55 +0000)
commit20ea39ef9f2f911bd01c69519e7d69cfec79fde3
treea07be85f251ac1fdc8b88a2068f9a5c5fe587949
parent7ce0f216221856a17fc4934b39284678a5fef2e9
iio: Fix scan mask selection

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 <[email protected]>
Signed-off-by: Alexandru Ardelean <[email protected]>
Fixes commit 057ac1acdfc4 ("iio: Use kmalloc_array() in iio_scan_mask_set()").
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
drivers/iio/industrialio-buffer.c
This page took 0.055522 seconds and 4 git commands to generate.