drm/amd: fix potential memory leak

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

s/free/kfree/ - Alex

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:49:56 -07:00 committed by Alex Deucher
parent 58dcc22106
commit 6160216fd2

View File

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