summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2019-08-31 14:20:38 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-09-13 17:36:22 -0500
commit8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c (patch)
tree14366b8e2ab896d9f827d210f322afd22b11de03 /drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
parent4ce71be67b08d00729f4d8735e2b76d8b5882d2c (diff)
drm/amdgpu: fix memory leak when ras is not supported on specific ip block
free ras_if if ras is not supported Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 82980efd3ee6..4830382ab8f2 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1728,7 +1728,8 @@ static int sdma_v4_0_late_init(void *handle)
if (r)
goto late_fini;
}
- }
+ } else
+ kfree(adev->sdma.ras_if);
return 0;
late_fini: