drm/amd: fix potential memory leak

This patch fix potential memory leak (clk_src) when function run
into last return NULL.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Bernard Zhao 2022-08-22 23:35:24 -07:00 committed by Alex Deucher
parent 6160216fd2
commit d200a64305

View File

@ -1643,6 +1643,7 @@ static struct clock_source *dcn31_clock_source_create(
}
BREAK_TO_DEBUGGER();
kfree(clk_src);
return NULL;
}