Skip to content

Commit

Permalink
drm/amd/display: Fix memory leak in dcn21_clock_source_create
Browse files Browse the repository at this point in the history
[ Upstream commit 65e5498 ]

When dcn20_clk_src_construct() fails, we need to release clk_src.

Fixes: 6f4e636 ("drm/amd/display: Add Renoir resource (v2)")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yuuoniy authored and gregkh committed May 9, 2022
1 parent 349bde7 commit af06f23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
Expand Up @@ -1427,6 +1427,7 @@ static struct clock_source *dcn21_clock_source_create(
return &clk_src->base;
}

kfree(clk_src);
BREAK_TO_DEBUGGER();
return NULL;
}
Expand Down

0 comments on commit af06f23

Please sign in to comment.