diff --git a/zephyr/lib/clk.c b/zephyr/lib/clk.c index 81094f229ce7..acb5e6734f83 100644 --- a/zephyr/lib/clk.c +++ b/zephyr/lib/clk.c @@ -28,6 +28,8 @@ void platform_clock_init(struct sof *sof) sof->clocks = platform_clocks_info; + BUILD_ASSERT(NUM_CLOCKS >= CONFIG_CORE_COUNT, "Invalid NUM_CLOCKS"); + for (i = 0; i < CONFIG_CORE_COUNT; i++) { sof->clocks[i] = (struct clock_info) { .freqs_num = NUM_CPU_FREQ,