iio: Use kmalloc_array() in iio_scan_mask_set()

commit 057ac1acdf upstream.

A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Markus Elfring 2016-09-23 22:30:32 +02:00 • committed by Ben Hutchings
commit 326b6adda0