Commit 3637d77f authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman

staging: iio: Use kcalloc instead of kzalloc

This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.
Signed-off-by: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ac04a87
...@@ -118,7 +118,7 @@ static int lis3l02dq_get_buffer_element(struct iio_dev *indio_dev, ...@@ -118,7 +118,7 @@ static int lis3l02dq_get_buffer_element(struct iio_dev *indio_dev,
int scan_count = bitmap_weight(indio_dev->active_scan_mask, int scan_count = bitmap_weight(indio_dev->active_scan_mask,
indio_dev->masklength); indio_dev->masklength);
rx_array = kzalloc(4 * scan_count, GFP_KERNEL); rx_array = kcalloc(4, scan_count, GFP_KERNEL);
if (rx_array == NULL) if (rx_array == NULL)
return -ENOMEM; return -ENOMEM;
ret = lis3l02dq_read_all(indio_dev, rx_array); ret = lis3l02dq_read_all(indio_dev, rx_array);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment