summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/kernel/sys_riscv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index 849b4170629d..c569dac7452e 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -103,8 +103,10 @@ static void hwprobe_arch_id(struct riscv_hwprobe *pair,
break;
}
- if (first)
+ if (first) {
id = cpu_id;
+ first = false;
+ }
/*
* If there's a mismatch for the given set, return -1 in the