diff mbox series

drm/amdkfd: Fix unchecked return value

Message ID 20190318180525.GA13768@embeddedor (mailing list archive)
State New, archived
Headers show
Series drm/amdkfd: Fix unchecked return value | expand

Commit Message

Gustavo A. R. Silva March 18, 2019, 6:05 p.m. UTC
Assign return value of function amdgpu_bo_sync_wait() to variable ret
for its further check.

Addresses-Coverity-ID: 1443914 ("Logically dead code")
Fixes: c60cd590cb7d ("drm/amdgpu: Replace ttm_bo_wait with amdgpu_bo_sync_wait")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Gustavo A. R. Silva March 18, 2019, 6:49 p.m. UTC | #1
On 3/18/19 1:25 PM, Kuehling, Felix wrote:
> Alex already applied an equivalent patch by Colin King (attached for 
> reference).
> 

Oh, that's great.  Good to know.

Thanks, Felix.
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 1921dec3df7a..fb621abcb006 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -906,7 +906,8 @@  static int init_kfd_vm(struct amdgpu_vm *vm, void **process_info,
 		pr_err("validate_pt_pd_bos() failed\n");
 		goto validate_pd_fail;
 	}
-	amdgpu_bo_sync_wait(vm->root.base.bo, AMDGPU_FENCE_OWNER_KFD, false);
+	ret = amdgpu_bo_sync_wait(vm->root.base.bo, AMDGPU_FENCE_OWNER_KFD,
+				  false);
 	if (ret)
 		goto wait_pd_fail;
 	amdgpu_bo_fence(vm->root.base.bo,