amdgpu/dc: Avoid dereferencing NULL pointer

crtc is dereferenced from within drm_atomic_get_new_crtc_state, so
check for NULL before initializing new_crtc_state.

Signed-off-by: Drew Davenport <ddavenport@chromium.org>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Drew Davenport 2017-10-27 12:34:46 -06:00 • committed by Alex Deucher
commit f5ba60fefa