diff options
| author | Hawking Zhang <[email protected]> | 2019-08-31 06:20:38 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-09-13 22:36:22 +0000 |
| commit | 8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c (patch) | |
| tree | 14366b8e2ab896d9f827d210f322afd22b11de03 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
| parent | drm/amdgpu: check mmhub_funcs pointer before refering to it (diff) | |
| download | kernel-8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c.tar.gz kernel-8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c.zip | |
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 <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
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: |
