mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: Fix unchecked return value
@ 2019-03-18 18:05 Gustavo A. R. Silva
  2019-03-18 18:25 ` Kuehling, Felix
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-03-18 18:05 UTC (permalink / raw)
  To: Oded Gabbay, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter,
	Felix Kuehling
  Cc: dri-devel, amd-gfx, linux-kernel, Gustavo A. R. Silva

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(-)

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,
-- 
2.21.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-18 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 18:05 [PATCH] drm/amdkfd: Fix unchecked return value Gustavo A. R. Silva
2019-03-18 18:25 ` Kuehling, Felix
2019-03-18 18:49   ` Gustavo A. R. Silva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®