aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0751-drm-amd-display-Fix-warnings-about-uninitialized-use.patch
blob: 12accd3edc188f632c2f12e997be3a067d72494f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 23a2518740a3e804ee707e47e5619fcb358c2a1d Mon Sep 17 00:00:00 2001
From: Harry Wentland <harry.wentland@amd.com>
Date: Tue, 8 Aug 2017 21:01:20 -0400
Subject: [PATCH 0751/4131] drm/amd/display: Fix warnings about uninitialized
 use

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c  | 2 +-
 drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 72eb6af..b858fec 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -541,7 +541,7 @@ bool dc_link_detect(struct dc_link *link, bool boot)
 	struct audio_support *aud_support = &link->dc->res_pool->audio_support;
 	enum dc_edid_status edid_status;
 	struct dc_context *dc_ctx = link->ctx;
-	struct dc_sink *sink;
+	struct dc_sink *sink = NULL;
 	enum dc_connection_type new_connection_type = dc_connection_none;
 
 	if (link->connector_signal == SIGNAL_TYPE_VIRTUAL)
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
index da08cc1..4035caf 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
@@ -265,6 +265,8 @@ static bool get_hw_supported_ddc_line(
 {
 	enum gpio_ddc_line line_found;
 
+	*line = GPIO_DDC_LINE_UNKNOWN;
+
 	if (!ddc) {
 		BREAK_TO_DEBUGGER();
 		return false;
-- 
2.7.4