amdgpu/dc: Avoid dereferencing NULL pointer
authorDrew Davenport <ddavenport@chromium.org>
Fri, 27 Oct 2017 18:34:46 +0000 (12:34 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 Nov 2017 16:58:41 +0000 (12:58 -0400)
commitf5ba60fefa00ca789c4eb35df38b171d532b3155
treeb2a1190330d9a4ecfd21cee02ad8dfcdaf1013c4
parent30b7c6147d18d77c6120a8f689d04d2518d3f5e4
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c