Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sung Joon Kim and committed by
Alex Deucher
295d91cb 72dc6bf1

+2 -1
+2 -1
drivers/gpu/drm/amd/display/dc/core/dc_surface.c
··· 143 143 if (pipe_ctx->plane_state != plane_state) 144 144 continue; 145 145 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; 147 148 148 149 break; 149 150 }