summaryrefslogtreecommitdiff
path: root/arch/riscv/cpu/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/cpu/cpu.c')
-rw-r--r--arch/riscv/cpu/cpu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index 15c4e14599d..d5123e4b7d9 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -608,14 +608,14 @@ static inline bool supports_extension(char ext)
static int riscv_cpu_probe(void)
{
-#ifdef CONFIG_CPU
- int ret;
+ if (CONFIG_IS_ENABLED(CPU)) {
+ int ret;
- /* probe cpus so that RISC-V timer can be bound */
- ret = cpu_probe_all();
- if (ret)
- return log_msg_ret("RISC-V cpus probe failed\n", ret);
-#endif
+ /* probe cpus so that RISC-V timer can be bound */
+ ret = cpu_probe_all();
+ if (ret)
+ return log_msg_ret("RISC-V cpus probe failed\n", ret);
+ }
return 0;
}