[PATCH 2/2] cpufreq: exynos: Initialise return variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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@xxxxxxxxxxx>
Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux