Commit 8670866b authored by Liao Chang's avatar Liao Chang Committed by Paolo Bonzini
Browse files

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: c9b8fecd ("KVM: use kvcalloc for array allocations")
Signed-off-by: default avatarLiao Chang <liaochang1@huawei.com>
Message-Id: <20221103011749.139262-1-liaochang1@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 074c0080
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1338,7 +1338,7 @@ int kvm_dev_ioctl_get_cpuid(struct kvm_cpuid2 *cpuid,
	if (sanity_check_entries(entries, cpuid->nent, type))
	if (sanity_check_entries(entries, cpuid->nent, type))
		return -EINVAL;
		return -EINVAL;


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