aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/2761-drm-amd-display-Fix-use-before-initialize-warning.patch
blob: a848b4aa144e10db380abf93e31ebe954acd927a (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
From 2f5af207d53796c3285048e68dbf5e3cdf394155 Mon Sep 17 00:00:00 2001
From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
Date: Wed, 8 Nov 2017 15:30:19 -0500
Subject: [PATCH 2761/4131] drm/amd/display: Fix use before initialize warning

on stream_for_cursor. Initialize to NULL.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index b9ec64c..fe55d6c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -2124,7 +2124,7 @@ static void dcn10_apply_ctx_for_surface(
 	}
 
 	if (num_planes > 0) {
-		struct dc_stream_state *stream_for_cursor;
+		struct dc_stream_state *stream_for_cursor = NULL;
 
 		program_all_pipe_in_tree(dc, top_pipe_to_program, context);
 
-- 
2.7.4