treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / md / dm-stats.c
index 56059fb56e2d255a0e635fdf56f9c6edfa20f0df..21de30b4e2a16051490ce5a2548c3711a3f0284e 100644 (file)
@@ -915,7 +915,9 @@ static int parse_histogram(const char *h, unsigned *n_histogram_entries,
                if (*q == ',')
                        (*n_histogram_entries)++;
 
-       *histogram_boundaries = kmalloc(*n_histogram_entries * sizeof(unsigned long long), GFP_KERNEL);
+       *histogram_boundaries = kmalloc_array(*n_histogram_entries,
+                                             sizeof(unsigned long long),
+                                             GFP_KERNEL);
        if (!*histogram_boundaries)
                return -ENOMEM;