drm/amd/display: guard for virtual calling destroy_link_encoders
authorMartin Leung <martin.leung@amd.com>
Fri, 19 Feb 2021 23:04:42 +0000 (18:04 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:12:37 +0000 (16:12 -0400)
commite73b386e75586f28b9b58641938ae0feb340bca0
treeb7ef10d2e1d88052ee427a99d57363ec6a6ae3f1
parent82a562ab5f0a918ef905c29c759b4f0c788754d3
drm/amd/display: guard for virtual calling destroy_link_encoders

[Why]:
On power down, virtual dal may try to delete link_encoders by
referencing uninitialized res_pool.

[How]:
Added guard against empty res_pool.

Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Martin Leung <martin.leung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c