treewide: kmalloc() -> kmalloc_array()
[linux-2.6-block.git] / drivers / md / dm-table.c
index 0589a4da12bbed66420052174d3818d3c2b4ff6c..938766794c2ef3b6caf538a0fa787447eadb160c 100644 (file)
@@ -548,23 +548,23 @@ static int adjoin(struct dm_table *table, struct dm_target *ti)
  * On the other hand, dm-switch needs to process bulk data using messages and
  * excessive use of GFP_NOIO could cause trouble.
  */
-static char **realloc_argv(unsigned *array_size, char **old_argv)
+static char **realloc_argv(unsigned *size, char **old_argv)
 {
        char **argv;
        unsigned new_size;
        gfp_t gfp;
 
-       if (*array_size) {
-               new_size = *array_size * 2;
+       if (*size) {
+               new_size = *size * 2;
                gfp = GFP_KERNEL;
        } else {
                new_size = 8;
                gfp = GFP_NOIO;
        }
-       argv = kmalloc(new_size * sizeof(*argv), gfp);
+       argv = kmalloc_array(new_size, sizeof(*argv), gfp);
        if (argv) {
-               memcpy(argv, old_argv, *array_size * sizeof(*argv));
-               *array_size = new_size;
+               memcpy(argv, old_argv, *size * sizeof(*argv));
+               *size = new_size;
        }
 
        kfree(old_argv);