diff options
author | Guchun Chen <guchun.chen@amd.com> | 2022-09-02 14:08:55 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-09-07 22:52:43 -0400 |
commit | aac4cec1ec45d72bd03eaf3fd772c5a609f5ed26 (patch) | |
tree | 38b583715fca0cc4d3f6d779dbc4c2f633b9ecfb /drivers | |
parent | d832db12af4a057582011a590f60f32853680dd4 (diff) | |
download | lwn-aac4cec1ec45d72bd03eaf3fd772c5a609f5ed26.tar.gz lwn-aac4cec1ec45d72bd03eaf3fd772c5a609f5ed26.zip |
drm/amdgpu: prevent toc firmware memory leak
It's missed in psp fini.
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 9f7a5e393f85..35738db12cd1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -486,11 +486,14 @@ static int psp_sw_fini(void *handle) release_firmware(psp->ta_fw); psp->ta_fw = NULL; } - if (adev->psp.cap_fw) { + if (psp->cap_fw) { release_firmware(psp->cap_fw); psp->cap_fw = NULL; } - + if (psp->toc_fw) { + release_firmware(psp->toc_fw); + psp->toc_fw = NULL; + } if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 0) || adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 7)) psp_sysfs_fini(adev); |