Skip to contentSkip to conversation

ppc32: Fix bogus return value in pmac_cpufreq.c

PATCH New Benjamin Herrenschmidt 1 participant 1 message Sep 24, 2004 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc32: Fix bogus return value in pmac_cpufreq.c

Hi !

There's an obvious uninitialized return value in pmac_cpufreq, here's a fix:

===== arch/ppc/platforms/pmac_cpufreq.c 1.15 vs edited =====

arch/ppc/platforms/pmac_cpufreq.c +1 -2
@@ -301,7 +301,6 @@
 static int __pmac do_set_cpu_speed(int speed_mode)
 {
 	struct cpufreq_freqs freqs;
-	int rc;
 
 	freqs.old = cur_freq;
 	freqs.new = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq;
@@ -315,7 +314,7 @@
 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 	cur_freq = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq;
 
-	return rc;
+	return 0;
 }
 
 static int __pmac pmac_cpufreq_verify(struct cpufreq_policy *policy)