drm/amd/display: destroy panel on link destruct

[Why]
without destroy it is causing a memory leak

[How]
destroy panel on link destruct

Signed-off-by: Anthony Koo <Anthony.Koo@amd.com>
Reviewed-by: Wyatt Wood <Wyatt.Wood@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Anthony Koo 2020-04-08 09:30:21 -04:00 committed by Alex Deucher
parent 7fc5c319ef
commit 9da3d05059

View File

@ -88,6 +88,9 @@ static void dc_link_destruct(struct dc_link *link)
if (link->ddc)
dal_ddc_service_destroy(&link->ddc);
if (link->panel)
link->panel->funcs->destroy(&link->panel);
if (link->link_enc)
link->link_enc->funcs->destroy(&link->link_enc);