diff options
| author | Jammy Zhou <[email protected]> | 2015-07-30 09:19:52 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-08-17 20:50:56 +0000 |
| commit | dd01d071957ded58d9bae3d3bf6061ada1d84692 (patch) | |
| tree | aac4e337038a02579763b45e7e3e726113bf6a40 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | |
| parent | drm/amdgpu: fix null pointer by previous cleanup (diff) | |
| download | kernel-dd01d071957ded58d9bae3d3bf6061ada1d84692.tar.gz kernel-dd01d071957ded58d9bae3d3bf6061ada1d84692.zip | |
drm/amdgpu: some code refinement v2
Fix the code alignment, etc.
v2: rebase the code
Signed-off-by: Jammy Zhou <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index 0f55c05c80b1..788dd348a650 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -33,11 +33,12 @@ static int amdgpu_sched_prepare_job(struct amd_gpu_scheduler *sched, { int r = 0; struct amdgpu_cs_parser *sched_job = (struct amdgpu_cs_parser *)job; - if (sched_job->prepare_job) + if (sched_job->prepare_job) { r = sched_job->prepare_job(sched_job); - if (r) { - DRM_ERROR("Prepare job error\n"); - schedule_work(&sched_job->job_work); + if (r) { + DRM_ERROR("Prepare job error\n"); + schedule_work(&sched_job->job_work); + } } return r; } |
