Skip to content

Commit 4ab68e1

Browse files
amd-sungkimalexdeucher
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 <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Xi (Alex) Liu <xi.liu@amd.com> Signed-off-by: Sung Joon Kim <sungjoon.kim@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 295d91c)
1 parent 6728f55 commit 4ab68e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)