From cc35babe63a89e932bea287e049b24563c051e87 Mon Sep 17 00:00:00 2001 From: Hyeonseong Gil Date: Fri, 20 Jan 2017 10:14:07 +0900 Subject: [PATCH] [COMMON] thermal: samsung: Fix prevent CID 11979 Change-Id: Ief6e4b7e65496a5aad6b51404bbe0987bd3bcf29 Signed-off-by: Hyeonseong Gil --- drivers/thermal/samsung/exynos_tmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 5767be2e60f1..3cdcf2c616e9 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1287,7 +1287,7 @@ static int exynos_cpufreq_cooling_register(struct exynos_tmu_data *data) cool_np = cooling_spec.np; for_each_possible_cpu(cpu) - if (cpu_topology[cpu].cluster_id == data->id) + if (cpu < NR_CPUS && cpu_topology[cpu].cluster_id == data->id) cpumask_copy(&mask_val, topology_core_cpumask(cpu)); if (!of_property_read_string(child, "governor", &governor_name)) { -- 2.20.1