Commit 75dbba34 authored by Yue Hin Lau's avatar Yue Hin Lau Committed by Alex Deucher

drm/amd/display: fix bug from last commit for hubbub

fix memory leak
Signed-off-by: default avatarYue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 56ef6ed9
...@@ -730,6 +730,12 @@ static void destruct(struct dcn10_resource_pool *pool) ...@@ -730,6 +730,12 @@ static void destruct(struct dcn10_resource_pool *pool)
kfree(TO_DCN10_MPC(pool->base.mpc)); kfree(TO_DCN10_MPC(pool->base.mpc));
pool->base.mpc = NULL; pool->base.mpc = NULL;
} }
if (pool->base.hubbub != NULL) {
kfree(pool->base.hubbub);
pool->base.hubbub = NULL;
}
for (i = 0; i < pool->base.pipe_count; i++) { for (i = 0; i < pool->base.pipe_count; i++) {
if (pool->base.opps[i] != NULL) if (pool->base.opps[i] != NULL)
pool->base.opps[i]->funcs->opp_destroy(&pool->base.opps[i]); pool->base.opps[i]->funcs->opp_destroy(&pool->base.opps[i]);
...@@ -1453,7 +1459,7 @@ static bool construct( ...@@ -1453,7 +1459,7 @@ static bool construct(
} }
pool->base.hubbub = dcn10_hubbub_create(ctx); pool->base.hubbub = dcn10_hubbub_create(ctx);
if (pool->base.mpc == NULL) { if (pool->base.hubbub == NULL) {
BREAK_TO_DEBUGGER(); BREAK_TO_DEBUGGER();
dm_error("DC: failed to create mpc!\n"); dm_error("DC: failed to create mpc!\n");
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment