From: Marcelo Roberto Jimenez Date: Mon, 18 Oct 2010 21:30:21 +0000 (+0100) Subject: ARM: 6449/1: Fix for compiler warning of uninitialized variable. X-Git-Tag: firefly_0821_release~7613^2~3546^2~14 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=521e9549d58ebcb53042c7aad6bc60d5c2fc975f;p=firefly-linux-kernel-4.4.55.git ARM: 6449/1: Fix for compiler warning of uninitialized variable. ARM: mach-sa1100: Fix for compiler warning of uninitialized variable. This is a fix for the compiler warning: 'new_ppcr' may be used uninitialized in this function. Signed-off-by: Marcelo Roberto Jimenez Signed-off-by: Russell King --- diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index c0a13ef5436f..96f7dc103b59 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c @@ -184,16 +184,15 @@ static int sa1100_target(struct cpufreq_policy *policy, { unsigned int cur = sa11x0_getspeed(0); unsigned int new_ppcr; - struct cpufreq_freqs freqs; + + new_ppcr = sa11x0_freq_to_ppcr(target_freq); switch(relation){ case CPUFREQ_RELATION_L: - new_ppcr = sa11x0_freq_to_ppcr(target_freq); if (sa11x0_ppcr_to_freq(new_ppcr) > policy->max) new_ppcr--; break; case CPUFREQ_RELATION_H: - new_ppcr = sa11x0_freq_to_ppcr(target_freq); if ((sa11x0_ppcr_to_freq(new_ppcr) > target_freq) && (sa11x0_ppcr_to_freq(new_ppcr - 1) >= policy->min)) new_ppcr--;