mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
drm/amd/display: Add null check before access structs
In enable_phantom_plane, we should better check null pointer before
accessing various structs.
Fixes: 09a4ec5da9 ("drm/amd/display: Refactor dc_state interface")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b17eecc08f
commit
c961400009
|
|
@ -750,6 +750,8 @@ static void enable_phantom_plane(struct dml2_context *ctx,
|
|||
ctx->config.svp_pstate.callbacks.dc,
|
||||
state,
|
||||
curr_pipe->plane_state);
|
||||
if (!phantom_plane)
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&phantom_plane->address, &curr_pipe->plane_state->address, sizeof(phantom_plane->address));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user