]> git.baikalelectronics.ru Git - kernel.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)
committerJonathan Cameron <jic23@kernel.org>
Sat, 24 Sep 2016 15:35:24 +0000 (16:35 +0100)
commit6c18109e735aaec2f58dfddf9e4f4f68f1f59f58
treeb5fd619aef3a8ec7bb216422b424c0cf5ceb114d
parent6517d5eab9d144dff131bf4ee74b1236598b9de9
iio: Use kmalloc_array() in iio_scan_mask_set()

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