drm/amd/display: Fix null pointer dereference for encoders
authorJimmy Kizito <Jimmy.Kizito@amd.com>
Sun, 12 Sep 2021 15:21:52 +0000 (11:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 Sep 2021 19:17:31 +0000 (15:17 -0400)
commit60f39edd897ea134a4ddb789a6795681691c3183
tree890a58d8b83178a8dd775921c6039ab1c4ca8278
parent39371f7d1396fa281eda67d0ede8221e5d8defe5
drm/amd/display: Fix null pointer dereference for encoders

[Why]
Links which are dynamically assigned link encoders have their link
encoder set to NULL.

[How]
Check that a pointer to a link_encoder object is non-NULL before using
it.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Meenakshikumar Somasundaram <meenakshikumar.somasundaram@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Jimmy Kizito <Jimmy.Kizito@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c