treewide: Use array_size() in vzalloc()
[linux-block.git] / drivers / soc / fsl / qbman / qman.c
index a7e94a3decf218510a5cfe0488cd908fecb7c4cc..ecb22749df0bfa4a4fc0596f8eb32a9b693c5004 100644 (file)
@@ -1021,7 +1021,8 @@ int qman_alloc_fq_table(u32 _num_fqids)
 {
        num_fqids = _num_fqids;
 
-       fq_table = vzalloc(num_fqids * 2 * sizeof(struct qman_fq *));
+       fq_table = vzalloc(array3_size(sizeof(struct qman_fq *),
+                                      num_fqids, 2));
        if (!fq_table)
                return -ENOMEM;