drm/amd/display: prevent reading unitialized links
authorMikita Lipski <mikita.lipski@amd.com>
Mon, 15 Nov 2021 21:07:38 +0000 (16:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Dec 2021 04:24:08 +0000 (23:24 -0500)
commit0755c38eb007196a5f779298b4a5f46c4eec41d2
tree0b448db4131dc6b4bab4871d962d7f76a7275bfe
parentaf6902ec415655236adea91826bd96ed0ab16f42
drm/amd/display: prevent reading unitialized links

[why/how]
The function can be called on boot or after suspend when
links are not initialized, to prevent it guard it with
NULL pointer check

Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_link.h