diff options
| author | Minghao Chi <[email protected]> | 2022-01-18 07:57:02 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-01-18 22:43:36 +0000 |
| commit | a5e7ffa11974d90d36f818ee34fc170722ec3098 (patch) | |
| tree | 5d3f5b55fd135f69243a537e61160a9007684c40 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | drm/radeon: fix UVD suspend error (diff) | |
| download | kernel-a5e7ffa11974d90d36f818ee34fc170722ec3098.tar.gz kernel-a5e7ffa11974d90d36f818ee34fc170722ec3098.zip | |
amdgpu/amdgpu_psp: remove unneeded ret variable
Return value from amdgpu_bo_create_kernel() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 5c9b67ab168f..f2806959736a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -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) |
