cpufreq: exynos: add missing variable initialization
diff mbox

Message ID 000301ce0348$43aec960$cb0c5c20$%han@samsung.com
State New, archived
Headers show

Commit Message

Jingoo Han Feb. 5, 2013, 2:26 a.m. UTC
Fixed build warning as below:

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]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/cpufreq/exynos-cpufreq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kim Kukjin Feb. 5, 2013, 5 a.m. UTC | #1
Jingoo Han wrote:
> 
> Fixed build warning as below:
> 
> 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]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  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.2.5

I already applied Sachin's patch for this.
http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg15019.html

Thanks.

- Kukjin



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

Patch
diff mbox

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);