video: exynos_dp: fix build warning due to uninitialized value
authorJingoo Han <jg1.han@samsung.com>
Wed, 20 Jun 2012 01:25:48 +0000 (10:25 +0900)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sun, 24 Jun 2012 13:54:31 +0000 (13:54 +0000)
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>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/exynos/exynos_dp_core.c

index a36b2d2..9db7b9f 100644 (file)
@@ -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;