summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/unaligned_access_speed.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/kernel/unaligned_access_speed.c')
-rw-r--r--arch/riscv/kernel/unaligned_access_speed.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/riscv/kernel/unaligned_access_speed.c b/arch/riscv/kernel/unaligned_access_speed.c
index 52264ea4f0bd..a9a6bcb02acf 100644
--- a/arch/riscv/kernel/unaligned_access_speed.c
+++ b/arch/riscv/kernel/unaligned_access_speed.c
@@ -218,8 +218,7 @@ static int check_unaligned_access_speed_all_cpus(void)
{
unsigned int cpu;
unsigned int cpu_count = num_possible_cpus();
- struct page **bufs = kzalloc(cpu_count * sizeof(struct page *),
- GFP_KERNEL);
+ struct page **bufs = kcalloc(cpu_count, sizeof(*bufs), GFP_KERNEL);
if (!bufs) {
pr_warn("Allocation failure, not measuring misaligned performance\n");