In function amdgpu_userq_restore_worker use directly the function's return value in the if condition instead of local variable ret.
Signed-off-by: Sunil Khatri <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 2a1832fce6d2..2b07c3941927 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -1222,20 +1222,17 @@ static void amdgpu_userq_restore_worker(struct work_struct *work) struct amdgpu_userq_mgr *uq_mgr = work_to_uq_mgr(work, resume_work.work); struct amdgpu_fpriv *fpriv = uq_mgr_to_fpriv(uq_mgr); struct dma_fence *ev_fence; - int ret; ev_fence = amdgpu_evf_mgr_get_fence(&fpriv->evf_mgr); if (!dma_fence_is_signaled(ev_fence)) goto put_fence; - ret = amdgpu_userq_vm_validate(uq_mgr); - if (ret) { + if (amdgpu_userq_vm_validate(uq_mgr)) { drm_file_err(uq_mgr->file, "Failed to validate BOs to restore\n"); goto put_fence; } - ret = amdgpu_userq_restore_all(uq_mgr); - if (ret) + if (amdgpu_userq_restore_all(uq_mgr)) drm_file_err(uq_mgr->file, "Failed to restore all queues\n"); put_fence: -- 2.34.1
