summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMiaoqian Lin <linmq006@gmail.com>2022-04-21 17:03:09 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-04-27 17:19:31 -0400
commit65e54987508b6f0771f56bdfa3ee1926d52785ae (patch)
tree12bb5b46896f95e809afde41e10c570f407043a4 /drivers
parentf95af4a9236695caed24fe6401256bb974e8f2a7 (diff)
drm/amd/display: Fix memory leak in dcn21_clock_source_create
When dcn20_clk_src_construct() fails, we need to release clk_src. Fixes: 6f4e6361c3ff ("drm/amd/display: Add Renoir resource (v2)") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
index 3fe4bfbb98a0..faab59508d82 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
@@ -997,6 +997,7 @@ static struct clock_source *dcn21_clock_source_create(
return &clk_src->base;
}
+ kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}