From: Chad Goodman Date: Mon, 10 Dec 2012 06:13:20 +0000 (-0800) Subject: CPUFREQ: Check cpufreq_frequency_table NULL X-Git-Url: https://ziggy471.com/git/gitweb.cgi?p=ziggy471-sgs3-jb.git;a=commitdiff;h=478698ff3d66b185e0a220917925fc3f1589fa2b CPUFREQ: Check cpufreq_frequency_table NULL Signed-off-by: Ziggy --- --- a/arch/arm/mach-msm/cpufreq.c +++ b/arch/arm/mach-msm/cpufreq.c @@ -179,6 +179,8 @@ static int __cpuinit msm_cpufreq_init(st return -ENODEV; table = cpufreq_frequency_get_table(policy->cpu); + if (table == NULL) + return -ENODEV; if (cpufreq_frequency_table_cpuinfo(policy, table)) { #ifdef CONFIG_MSM_CPU_FREQ_SET_MIN_MAX policy->cpuinfo.min_freq = CONFIG_MSM_CPU_FREQ_MIN;