drm/amd/display: do not dereference on NULL

WARN_ON() will not kill the process so the second WARN_ON()
will try to dereference NULL pointer.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Nirmoy Das 2021-05-27 14:03:33 +02:00 committed by Alex Deucher
parent 16eb48c62b
commit 57738ae40f
1 changed files with 4 additions and 1 deletions

View File

@ -9013,7 +9013,10 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
}
status = dc_stream_get_status(dm_new_crtc_state->stream);
WARN_ON(!status);
if (WARN_ON(!status))
continue;
WARN_ON(!status->plane_count);
/*