drm/amd/display: Guard against null stream dereference in do flip
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 11 Sep 2018 18:29:47 +0000 (14:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Sep 2018 02:09:07 +0000 (21:09 -0500)
commitd999853e60a00596bb625ab34909cc9317c6dbae
tree40a8fa22d889aa88e0aca5a9f4fa6baff00bf6e1
parent99267ce71a1faabce9d8063d37e1ee7dd240b6eb
drm/amd/display: Guard against null stream dereference in do flip

[Why]

During suspend under some hardware configurations can result in a
series of atomic commits with a NULL stream status - which
causes a NULL pointer dereference. This should be guarded.

[How]

Exit early from the function - if we can't access the stream then
there isn't anything that can be done here.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c