linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] video: exynos_dp: fix build warning due to uninitialized value
@ 2012-06-20  1:25 Jingoo Han
  2012-06-24 21:00 ` Florian Tobias Schandinat
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2012-06-20  1:25 UTC (permalink / raw)
  To: 'Florian Tobias Schandinat'
  Cc: linux-fbdev, linux-kernel, 'Olof Johansson',
	'Jingoo Han'

This patch fixes build warning due to uninitialized value dereference.

drivers/video/exynos/exynos_dp_core.c: In function 'exynos_dp_set_link_train':
drivers/video/exynos/exynos_dp_core.c:529:18: warning: 'reg' may be used uninitialized in this function [-Wuninitialized]
drivers/video/exynos/exynos_dp_core.c:395:6: note: 'reg' was declared here

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/exynos/exynos_dp_core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
index a36b2d2..9db7b9f 100644
--- a/drivers/video/exynos/exynos_dp_core.c
+++ b/drivers/video/exynos/exynos_dp_core.c
@@ -407,6 +407,9 @@ static unsigned int exynos_dp_get_lane_link_training(
 	case 3:
 		reg = exynos_dp_get_lane3_link_training(dp);
 		break;
+	default:
+		WARN_ON(1);
+		return 0;
 	}
 
 	return reg;
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] video: exynos_dp: fix build warning due to uninitialized value
  2012-06-20  1:25 [PATCH v2] video: exynos_dp: fix build warning due to uninitialized value Jingoo Han
@ 2012-06-24 21:00 ` Florian Tobias Schandinat
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Tobias Schandinat @ 2012-06-24 21:00 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-fbdev, linux-kernel, 'Olof Johansson'

On 06/20/2012 01:25 AM, Jingoo Han wrote:
> This patch fixes build warning due to uninitialized value dereference.
> 
> drivers/video/exynos/exynos_dp_core.c: In function 'exynos_dp_set_link_train':
> drivers/video/exynos/exynos_dp_core.c:529:18: warning: 'reg' may be used uninitialized in this function [-Wuninitialized]
> drivers/video/exynos/exynos_dp_core.c:395:6: note: 'reg' was declared here
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/exynos/exynos_dp_core.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c
> index a36b2d2..9db7b9f 100644
> --- a/drivers/video/exynos/exynos_dp_core.c
> +++ b/drivers/video/exynos/exynos_dp_core.c
> @@ -407,6 +407,9 @@ static unsigned int exynos_dp_get_lane_link_training(
>  	case 3:
>  		reg = exynos_dp_get_lane3_link_training(dp);
>  		break;
> +	default:
> +		WARN_ON(1);
> +		return 0;
>  	}
>  
>  	return reg;


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-24 21:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-20  1:25 [PATCH v2] video: exynos_dp: fix build warning due to uninitialized value Jingoo Han
2012-06-24 21:00 ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).