mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
drm/amdgpu: fix memory leak during TDR test(v2)
fix system memory leak v2: fix coding style Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
97d9a4e961
commit
4829f89855
1 changed files with 5 additions and 1 deletions
|
@ -978,8 +978,12 @@ int smu_v11_0_init_max_sustainable_clocks(struct smu_context *smu)
|
|||
struct smu_11_0_max_sustainable_clocks *max_sustainable_clocks;
|
||||
int ret = 0;
|
||||
|
||||
max_sustainable_clocks = kzalloc(sizeof(struct smu_11_0_max_sustainable_clocks),
|
||||
if (!smu->smu_table.max_sustainable_clocks)
|
||||
max_sustainable_clocks = kzalloc(sizeof(struct smu_11_0_max_sustainable_clocks),
|
||||
GFP_KERNEL);
|
||||
else
|
||||
max_sustainable_clocks = smu->smu_table.max_sustainable_clocks;
|
||||
|
||||
smu->smu_table.max_sustainable_clocks = (void *)max_sustainable_clocks;
|
||||
|
||||
max_sustainable_clocks->uclock = smu->smu_table.boot_values.uclk / 100;
|
||||
|
|
Loading…
Reference in a new issue