projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: Use array_size() in vzalloc()
[linux-block.git]
/
arch
/
powerpc
/
mm
/
mmu_context_iommu.c
diff --git
a/arch/powerpc/mm/mmu_context_iommu.c
b/arch/powerpc/mm/mmu_context_iommu.c
index 4c615fcb0cf073bbdc8f746c0e54abdd1082e142..abb43646927aa9575c3aeec91ae55905545b6026 100644
(file)
--- a/
arch/powerpc/mm/mmu_context_iommu.c
+++ b/
arch/powerpc/mm/mmu_context_iommu.c
@@
-159,7
+159,7
@@
long mm_iommu_get(struct mm_struct *mm, unsigned long ua, unsigned long entries,
goto unlock_exit;
}
- mem->hpas = vzalloc(
entries * sizeof(mem->hpas[0]
));
+ mem->hpas = vzalloc(
array_size(entries, sizeof(mem->hpas[0])
));
if (!mem->hpas) {
kfree(mem);
ret = -ENOMEM;