aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorJiang Liu <gerry@linux.alibaba.com>2025-02-07 14:28:49 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-02-12 21:04:08 -0500
commite92f3f94cad24154fd3baae30c6dfb918492278d (patch)
tree30f37d4f467eb7d8c263aca766d35b88c746dc11 /drivers/gpu/drm/amd/amdgpu
parentdrm/amdgpu: Add flags to distinguish vf/pf/pt mode (diff)
downloadwireguard-linux-e92f3f94cad24154fd3baae30c6dfb918492278d.tar.xz
wireguard-linux-e92f3f94cad24154fd3baae30c6dfb918492278d.zip
drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
Reset psp->cmd to NULL after releasing the buffer in function psp_sw_fini(). Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Jiang Liu <gerry@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index c609c96a999d..48b55dae6241 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -541,7 +541,6 @@ static int psp_sw_fini(struct amdgpu_ip_block *ip_block)
{
struct amdgpu_device *adev = ip_block->adev;
struct psp_context *psp = &adev->psp;
- struct psp_gfx_cmd_resp *cmd = psp->cmd;
psp_memory_training_fini(psp);
@@ -551,8 +550,8 @@ static int psp_sw_fini(struct amdgpu_ip_block *ip_block)
amdgpu_ucode_release(&psp->cap_fw);
amdgpu_ucode_release(&psp->toc_fw);
- kfree(cmd);
- cmd = NULL;
+ kfree(psp->cmd);
+ psp->cmd = NULL;
psp_free_shared_bufs(psp);