diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2019-08-31 14:20:38 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-13 17:36:22 -0500 |
commit | 8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c (patch) | |
tree | 14366b8e2ab896d9f827d210f322afd22b11de03 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
parent | 4ce71be67b08d00729f4d8735e2b76d8b5882d2c (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/gfx_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 351aefcf3151..1bd2f56186f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -4440,7 +4440,8 @@ static int gfx_v9_0_ecc_late_init(void *handle) r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); if (r) goto late_fini; - } + } else + kfree(adev->gfx.ras_if); return 0; late_fini: |