diff options
| author | Chunming Zhou <david1.zhou@amd.com> | 2015-07-28 04:11:52 -0400 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:39 -0400 |
| commit | afe10081498fdf2c5b92c7fcc534e49544218fb9 (patch) | |
| tree | 009b6a88562bb3ce54082c77792d33f5371d841c /drivers/gpu/drm/amd/amdgpu | |
| parent | 02b9f0bfd49da01629eef6d250c477490047acd6 (diff) | |
drm/amdgpu: add check for callback
it is possible that the callback isn't defined sometimes.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 9ff4d2756a6f..c41360e443be 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
| @@ -137,7 +137,8 @@ static void amdgpu_job_work_func(struct work_struct *work) | |||
| 137 | container_of(work, struct amdgpu_cs_parser, | 137 | container_of(work, struct amdgpu_cs_parser, |
| 138 | job_work); | 138 | job_work); |
| 139 | mutex_lock(&sched_job->job_lock); | 139 | mutex_lock(&sched_job->job_lock); |
| 140 | sched_job->free_job(sched_job); | 140 | if (sched_job->free_job) |
| 141 | sched_job->free_job(sched_job); | ||
| 141 | mutex_unlock(&sched_job->job_lock); | 142 | mutex_unlock(&sched_job->job_lock); |
| 142 | /* after processing job, free memory */ | 143 | /* after processing job, free memory */ |
| 143 | kfree(sched_job); | 144 | kfree(sched_job); |
