From: Monk Liu Date: Mon, 30 May 2016 07:16:26 +0000 (+0800) Subject: drm/amdgpu: fix tonga smu_fini mem leak X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=86e4cdd675f489e0b3deaa3d6b75cddadd16e71c;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: fix tonga smu_fini mem leak Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher --- 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;