Skip to content

Commit 4ab68e1

Browse files
Sung Joon Kimalexdeucher
authored andcommitted
drm/amd/display: Check for NULL pointer
[why & how] Need to make sure plane_state is initialized before accessing its members. Cc: Mario Limonciello <[email protected]> Cc: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Xi (Alex) Liu <[email protected]> Signed-off-by: Sung Joon Kim <[email protected]> Signed-off-by: Aurabindo Pillai <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 295d91c)
1 parent 6728f55 commit 4ab68e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_surface.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ const struct dc_plane_status *dc_plane_get_status(
143143
if (pipe_ctx->plane_state != plane_state)
144144
continue;
145145

146-
pipe_ctx->plane_state->status.is_flip_pending = false;
146+
if (pipe_ctx->plane_state)
147+
pipe_ctx->plane_state->status.is_flip_pending = false;
147148

148149
break;
149150
}

0 commit comments

Comments
 (0)