Applied. Thanks! On Fri, Feb 7, 2025 at 6:17 AM Lazar, Lijo <lijo.lazar@xxxxxxx> wrote: > > > > On 2/7/2025 11:58 AM, Jiang Liu wrote: > > Reset psp->cmd to NULL after releasing the buffer in function psp_sw_fini(). > > > > Signed-off-by: Jiang Liu <gerry@xxxxxxxxxxxxxxxxx> > > Reviewed-by: Lijo Lazar <lijo.lazar@xxxxxxx> > > Thanks, > Lijo > > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 ++--- > > 1 file 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 babe94ade247..4e9766a1d421 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > > @@ -533,7 +533,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); > > > > @@ -543,8 +542,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); > > >