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/gmc_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/gmc_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 08a47a5785cd..6a61e5c5b2ce 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -797,7 +797,8 @@ static int gmc_v9_0_ecc_late_init(void *handle) r = amdgpu_irq_get(adev, &adev->gmc.ecc_irq, 0); if (r) goto umc_late_fini; - } + } else + kfree(adev->gmc.umc_ras_if); if (adev->mmhub_funcs && adev->mmhub_funcs->ras_late_init) { r = adev->mmhub_funcs->ras_late_init(adev); |