diff options
author | Monk Liu <Monk.Liu@amd.com> | 2016-05-30 15:16:26 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-06-09 10:49:13 -0400 |
commit | 86e4cdd675f489e0b3deaa3d6b75cddadd16e71c (patch) | |
tree | a8886eea52cf60de44df061d524ce11a17bb3bfa | |
parent | e6232effab9091472689b1c5604a7e59d320a8e0 (diff) | |
download | linux-86e4cdd675f489e0b3deaa3d6b75cddadd16e71c.tar.bz2 |
drm/amdgpu: fix tonga smu_fini mem leak
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c index 32820b680d88..70d3ecf27bde 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c @@ -328,6 +328,11 @@ int tonga_write_smc_sram_dword(struct pp_smumgr *smumgr, static int tonga_smu_fini(struct pp_smumgr *smumgr) { + struct tonga_smumgr *priv = (struct tonga_smumgr *)(smumgr->backend); + + smu_free_memory(smumgr->device, (void *)priv->smu_buffer.handle); + smu_free_memory(smumgr->device, (void *)priv->header_buffer.handle); + if (smumgr->backend != NULL) { kfree(smumgr->backend); smumgr->backend = NULL; |