From: Navya Sri Nizamkari Date: Tue, 10 Mar 2015 12:04:29 +0000 (+0530) Subject: staging: iio: Use kcalloc instead of kzalloc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3637d77f5f3ce080e9a2c4f1435f7ce0f5a4ef48;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Navya Sri Nizamkari Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index 1fd90090a633..e6101bbc7fbd 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -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, indio_dev->masklength); - rx_array = kzalloc(4 * scan_count, GFP_KERNEL); + rx_array = kcalloc(4, scan_count, GFP_KERNEL); if (rx_array == NULL) return -ENOMEM; ret = lis3l02dq_read_all(indio_dev, rx_array);