drm/amdgpu: fix missing assignment of error return code to variable ret
Subsystems (4)
PATCH 1/1 drm/amdgpu: fix missing assignment of error return code to variable ret
From: Colin Ian King <[email protected]>
An earlier commit replaced ttm_bo_wait with amdgpu_bo_sync_wait and removed the error return assignment to variable ret. Fix this by adding the assignment back. Also break line to clean up checkpatch overly long line warning.
Detected by CoverityScan, CID#1477327 ("Logically dead code")
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2 -1
@@ -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,
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 8 lines · Colin King
From: Colin Ian King <[email protected]>
An earlier commit replaced
ttm_bo_waitwithamdgpu_bo_sync_waitand removed the error return assignment to variable ret. Fix this by adding the assignment back. Also break line to clean up checkpatch overly long line warning.
Quoted 4 lines
Detected by CoverityScan, CID#1477327 ("Logically dead code")
Fixes c60cd590cb7d ("drm/amdgpu: Replace ttm_bo_wait with amdgpu_bo_sync_wait")Signed-off-by Colin Ian King <[email protected]>
Applied. thanks!
Alex
Quoted 21 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +2
-2@@ -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.20.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx