staging: iio: Use kcalloc instead of kzalloc to allocate array
[firefly-linux-kernel-4.4.55.git] / drivers / staging / iio / accel / lis3l02dq_ring.c
index 89527af8f4c5aa30fd3c99dee46b52207027c93e..a9005027120445fba12a947b61cb1b29d98df68a 100644 (file)
@@ -93,8 +93,7 @@ static int lis3l02dq_read_all(struct iio_dev *indio_dev, u8 *rx_array)
        struct spi_message msg;
        int ret, i, j = 0;
 
-       xfers = kzalloc((buffer->scan_count) * 2
-                       * sizeof(*xfers), GFP_KERNEL);
+       xfers = kcalloc((buffer->scan_count) * 2, sizeof(*xfers), GFP_KERNEL);
        if (!xfers)
                return -ENOMEM;