Merge tag 'pinctrl-v3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[deliverable/linux.git] / net / batman-adv / hash.c
index 63bdf7e94f1ef59964ee39f51a0d0b802b2ca586..7c1c63080e20362cd628251b37f44da446cdbdba 100644 (file)
@@ -46,12 +46,12 @@ struct batadv_hashtable *batadv_hash_new(uint32_t size)
        if (!hash)
                return NULL;
 
-       hash->table = kmalloc(sizeof(*hash->table) * size, GFP_ATOMIC);
+       hash->table = kmalloc_array(size, sizeof(*hash->table), GFP_ATOMIC);
        if (!hash->table)
                goto free_hash;
 
-       hash->list_locks = kmalloc(sizeof(*hash->list_locks) * size,
-                                  GFP_ATOMIC);
+       hash->list_locks = kmalloc_array(size, sizeof(*hash->list_locks),
+                                        GFP_ATOMIC);
        if (!hash->list_locks)
                goto free_table;
 
This page took 0.025114 seconds and 5 git commands to generate.