treewide: Use array_size() in vzalloc()
[linux-block.git] / drivers / gpu / drm / drm_hashtab.c
index dae18e58e79be6870a7061c07ec6c4f90e0e848b..c92b00d42ecea4ebb6bcf075fac6eb868c9ea0c9 100644 (file)
@@ -47,7 +47,7 @@ int drm_ht_create(struct drm_open_hash *ht, unsigned int order)
        if (size <= PAGE_SIZE / sizeof(*ht->table))
                ht->table = kcalloc(size, sizeof(*ht->table), GFP_KERNEL);
        else
-               ht->table = vzalloc(size*sizeof(*ht->table));
+               ht->table = vzalloc(array_size(size, sizeof(*ht->table)));
        if (!ht->table) {
                DRM_ERROR("Out of memory for hash table\n");
                return -ENOMEM;