msm: cpufreq: Move cpufreq table checking earlier

During cpufreq driver init we check whether cpufreq table
is initialize or not. Let's move this check even before
setting any cpufreq policy. Since if table itself is
not initialized then there is no need for further action,
we will just return from that point.

Change-Id: I06eed5c4aad9bbaeac351305392b7247b0220f2f
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
diff --git a/arch/arm/mach-msm/cpufreq.c b/arch/arm/mach-msm/cpufreq.c
index 107598a..6512872 100644
--- a/arch/arm/mach-msm/cpufreq.c
+++ b/arch/arm/mach-msm/cpufreq.c
@@ -165,6 +165,10 @@
 	struct cpufreq_work_struct *cpu_work = NULL;
 #endif
 
+
+	table = cpufreq_frequency_get_table(policy->cpu);
+	if (table == NULL)
+		return -ENODEV;
 	/*
 	 * In 8625 both cpu core's frequency can not
 	 * be changed independently. Each cpu is bound to
@@ -173,9 +177,6 @@
 	if (cpu_is_msm8625())
 		cpumask_setall(policy->cpus);
 
-	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;