summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
diff options
context:
space:
mode:
authorJammy Zhou2015-07-30 11:19:52 +0200
committerAlex Deucher2015-08-17 22:50:56 +0200
commitdd01d071957ded58d9bae3d3bf6061ada1d84692 (patch)
treeaac4e337038a02579763b45e7e3e726113bf6a40 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
parentdrm/amdgpu: fix null pointer by previous cleanup (diff)
downloadkernel-qcow2-linux-dd01d071957ded58d9bae3d3bf6061ada1d84692.tar.gz
kernel-qcow2-linux-dd01d071957ded58d9bae3d3bf6061ada1d84692.tar.xz
kernel-qcow2-linux-dd01d071957ded58d9bae3d3bf6061ada1d84692.zip
drm/amdgpu: some code refinement v2
Fix the code alignment, etc. v2: rebase the code Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c9
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;
}