mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/amdgpu: If amdgpu_ib_schedule fails return back the error.
Use ERR_PTR to return back the error happened during amdgpu_ib_schedule. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
		
							parent
							
								
									167bf96014
								
							
						
					
					
						commit
						57c0f58e9f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -218,7 +218,7 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
 | 
			
		|||
	struct amdgpu_ring *ring = to_amdgpu_ring(sched_job->sched);
 | 
			
		||||
	struct dma_fence *fence = NULL, *finished;
 | 
			
		||||
	struct amdgpu_job *job;
 | 
			
		||||
	int r;
 | 
			
		||||
	int r = 0;
 | 
			
		||||
 | 
			
		||||
	job = to_amdgpu_job(sched_job);
 | 
			
		||||
	finished = &job->base.s_fence->finished;
 | 
			
		||||
| 
						 | 
				
			
			@ -243,6 +243,8 @@ static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
 | 
			
		|||
	job->fence = dma_fence_get(fence);
 | 
			
		||||
 | 
			
		||||
	amdgpu_job_free_resources(job);
 | 
			
		||||
 | 
			
		||||
	fence = r ? ERR_PTR(r) : fence;
 | 
			
		||||
	return fence;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue