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
/
x86
/
kvm
/
cpuid.c
diff --git
a/arch/x86/kvm/cpuid.c
b/arch/x86/kvm/cpuid.c
index 66fc27b92c59f23258f95f7c71cc77228ce982ff..812cada68e0f44f07e27914d2f32e3288c6315b5 100644
(file)
--- a/
arch/x86/kvm/cpuid.c
+++ b/
arch/x86/kvm/cpuid.c
@@
-785,7
+785,8
@@
int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
return -EINVAL;
r = -ENOMEM;
- cpuid_entries = vzalloc(sizeof(struct kvm_cpuid_entry2) * cpuid->nent);
+ cpuid_entries = vzalloc(array_size(sizeof(struct kvm_cpuid_entry2),
+ cpuid->nent));
if (!cpuid_entries)
goto out;