Skip to content

Commit

Permalink
amdgpu/amdgpu_psp: remove unneeded ret variable
Browse files Browse the repository at this point in the history
Return value from amdgpu_bo_create_kernel() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Minghao Chi authored and alexdeucher committed Jan 18, 2022
1 parent dfd6879 commit a5e7ffa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Expand Up @@ -941,19 +941,15 @@ static void psp_prep_ta_load_cmd_buf(struct psp_gfx_cmd_resp *cmd,
static int psp_ta_init_shared_buf(struct psp_context *psp,
struct ta_mem_context *mem_ctx)
{
int ret;

/*
* Allocate 16k memory aligned to 4k from Frame Buffer (local
* physical) for ta to host memory
*/
ret = amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
return amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM,
&mem_ctx->shared_bo,
&mem_ctx->shared_mc_addr,
&mem_ctx->shared_buf);

return ret;
}

static void psp_ta_free_shared_buf(struct ta_mem_context *mem_ctx)
Expand Down

0 comments on commit a5e7ffa

Please sign in to comment.