From: Hyeonseong Gil Date: Fri, 20 Jan 2017 01:14:07 +0000 (+0900) Subject: [COMMON] thermal: samsung: Fix prevent CID 11979 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cc35babe63a89e932bea287e049b24563c051e87;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: samsung: Fix prevent CID 11979 Change-Id: Ief6e4b7e65496a5aad6b51404bbe0987bd3bcf29 Signed-off-by: Hyeonseong Gil --- 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)) {