'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.c...@samsung.com>
Signed-off-by: Sachin Kamat <sachin.ka...@linaro.org>
---
 drivers/cpufreq/exynos-cpufreq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index 88401ba..4268e46 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -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);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to