drm/amd/display: Fix potential NULL and mem leak in create_links
authorHarry Wentland <harry.wentland@amd.com>
Sat, 11 Nov 2017 01:11:37 +0000 (20:11 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Nov 2017 22:56:33 +0000 (17:56 -0500)
commitedf38b58ecd847df75723fb90d4a1c3669b1e670
tree023b2dae073a03036a70768aa7f4d7d4bb9ba9b8
parentb3fb2b4e21a995c4fa511627088bd55b88f6be11
drm/amd/display: Fix potential NULL and mem leak in create_links

Found by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:148 create_links()
error: potential null dereference 'link->link_enc'.  (kzalloc returns
null)

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c