Message ID | 1380173202-12624-1-git-send-email-sachin.kamat@linaro.org (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On 26 September 2013 10:56, Sachin Kamat <sachin.kamat@linaro.org> wrote: > 'clk_round_rate' returns a negative error code upon failure. This > will never get detected by unsigned 'newfreq'. Make it signed. > > Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> > --- > drivers/cpufreq/spear-cpufreq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index 19e364fa..3f41816 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -113,7 +113,7 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) { struct cpufreq_freqs freqs; - unsigned long newfreq; + long newfreq; struct clk *srcclk; int index, ret, mult = 1;
'clk_round_rate' returns a negative error code upon failure. This will never get detected by unsigned 'newfreq'. Make it signed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/cpufreq/spear-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)