Skip to content

Commit 8670866

Browse files
Liao Changbonzini
authored andcommitted
KVM: x86: Fix a typo about the usage of kvcalloc()
Swap the 1st and 2nd arguments to be consistent with the usage of kvcalloc(). Fixes: c9b8fec ("KVM: use kvcalloc for array allocations") Signed-off-by: Liao Chang <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 074c008 commit 8670866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
13381338
if (sanity_check_entries(entries, cpuid->nent, type))
13391339
return -EINVAL;
13401340

1341-
array.entries = kvcalloc(sizeof(struct kvm_cpuid_entry2), cpuid->nent, GFP_KERNEL);
1341+
array.entries = kvcalloc(cpuid->nent, sizeof(struct kvm_cpuid_entry2), GFP_KERNEL);
13421342
if (!array.entries)
13431343
return -ENOMEM;
13441344

0 commit comments

Comments
 (0)