drm/amdgpu: fix fiji smu fini mem leak
authorMonk Liu <Monk.Liu@amd.com>
Mon, 30 May 2016 07:16:04 +0000 (15:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Jun 2016 14:49:12 +0000 (10:49 -0400)
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>
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c

index 673a75c74e18a33c2a42f0ae92bca8e40ee30603..0ac8642002838fb734ba4674bd88bce9a9067feb 100644 (file)
@@ -1006,6 +1006,10 @@ static int fiji_smu_init(struct pp_smumgr *smumgr)
 
 static int fiji_smu_fini(struct pp_smumgr *smumgr)
 {
+       struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
+
+       smu_free_memory(smumgr->device, (void *)priv->header_buffer.handle);
+
        if (smumgr->backend) {
                kfree(smumgr->backend);
                smumgr->backend = NULL;