]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: Use kmalloc_array() in iio_scan_mask_set()
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 23 Sep 2016 20:30:32 +0000 (22:30 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Aug 2019 11:38:39 +0000 (12:38 +0100)
commit326b6adda0340f9de6da470906a5c262e2d738ff
tree7b20bed2fbd32dfef55365b232eab693df63cc16
parentb8da660f62ed905b3afc953488abfacf359d2d79
iio: Use kmalloc_array() in iio_scan_mask_set()

commit 057ac1acdfc4743f066fcefe359385cad00549eb 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>
drivers/iio/industrialio-buffer.c