drm/amd/display: fix NULL pointer in dm_commit_surfaces
authorJerry Zuo <Jerry.Zuo@amd.com>
Wed, 24 May 2017 15:01:32 +0000 (11:01 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:07:36 +0000 (18:07 -0400)
commitafdbd4ccfd36eb18ce89b504d79bb3051cdab839
treeaa53498e46516130fe26606ab9098ff7c0d74f0a
parentece22899a46551dcd8e9f3296ce1ec8ac9e07dc4
drm/amd/display: fix NULL pointer in dm_commit_surfaces

Check if adding surface is failed to prevent NULL pointer deref.

Signed-off-by: Jerry Zuo <Jerry.Zuo@amd.com>
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_types.c