[PATCH] ppc32: Fix bogus return value in pmac_cpufreq.c

From: Benjamin Herrenschmidt
Date: Thu Sep 23 2004 - 19:23:14 EST


Hi !

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

Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>

===== arch/ppc/platforms/pmac_cpufreq.c 1.15 vs edited =====
--- 1.15/arch/ppc/platforms/pmac_cpufreq.c 2004-09-14 10:23:16 +10:00
+++ edited/arch/ppc/platforms/pmac_cpufreq.c 2004-09-24 10:15:41 +10:00
@@ -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)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/