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/sdma_v4_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/sdma_v4_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 |
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: |
