summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2016-05-30 15:16:26 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-06-09 10:49:13 -0400
commit86e4cdd675f489e0b3deaa3d6b75cddadd16e71c (patch)
treea8886eea52cf60de44df061d524ce11a17bb3bfa /drivers
parente6232effab9091472689b1c5604a7e59d320a8e0 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c5
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;