Skip to content

Commit

Permalink
cpufreq: exynos: Initialize return variable
Browse files Browse the repository at this point in the history
'ret' is undefined when the function returns from the first
'if' condition. Without this patch we get the following warning:

drivers/cpufreq/exynos-cpufreq.c: In function 'exynos_target':
drivers/cpufreq/exynos-cpufreq.c:182:2: warning: 'ret' may be used uninitialized in this function [-Wuninitialized]

Suggested-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Sachin Kamat authored and Kukjin Kim committed Feb 1, 2013
1 parent d271d07 commit 229b21e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/exynos-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int exynos_target(struct cpufreq_policy *policy,
{
struct cpufreq_frequency_table *freq_table = exynos_info->freq_table;
unsigned int index;
int ret;
int ret = 0;

mutex_lock(&cpufreq_lock);

Expand Down

0 comments on commit 229b21e

Please sign in to comment.