From: Bhuvanachandra Pinninti <[email protected]> [why] Allocated memory for dcn10_dio but not freed in dcn401_resource.
[how] Add kfree for it in dcn401_resource. Reviewed-by: Aric Cyr <[email protected]> Signed-off-by: Bhuvanachandra Pinninti <[email protected]> Signed-off-by: Wayne Lin <[email protected]> --- .../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c index df3acf589582..4875faffe873 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c @@ -1532,6 +1532,11 @@ static void dcn401_resource_destruct(struct dcn401_resource_pool *pool) if (pool->base.dccg != NULL) dcn_dccg_destroy(&pool->base.dccg); + if (pool->base.dio != NULL) { + kfree(TO_DCN10_DIO(pool->base.dio)); + pool->base.dio = NULL; + } + if (pool->base.oem_device != NULL) { struct dc *dc = pool->base.oem_device->ctx->dc; -- 2.43.0
