diff options
-rw-r--r-- | drivers/misc/tegra-profiler/power_clk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/tegra-profiler/power_clk.c b/drivers/misc/tegra-profiler/power_clk.c index 7af075391939..b7b198333fae 100644 --- a/drivers/misc/tegra-profiler/power_clk.c +++ b/drivers/misc/tegra-profiler/power_clk.c @@ -210,7 +210,7 @@ read_source(struct power_clk_source *s, int cpu) switch (s->type) { case QUADD_POWER_CLK_CPU: /* update cpu frequency */ - if (cpu < 0 || cpu >= POWER_CLK_MAX_VALUES) { + if (cpu < 0 || cpu >= max_t(int, s->nr, nr_cpu_ids)) { pr_err_once("error: cpu id: %d\n", cpu); break; } |