From: Chunming Zhou Date: Tue, 28 Jul 2015 08:11:52 +0000 (+0800) Subject: drm/amdgpu: add check for callback X-Git-Tag: v4.3-rc1~75^2~22^2~73 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=afe10081498fdf2c5b92c7fcc534e49544218fb9;p=karo-tx-linux.git drm/amdgpu: add check for callback it is possible that the callback isn't defined sometimes. Signed-off-by: Chunming Zhou Reviewed-by: Christian K?nig --- 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) container_of(work, struct amdgpu_cs_parser, job_work); mutex_lock(&sched_job->job_lock); - sched_job->free_job(sched_job); + if (sched_job->free_job) + sched_job->free_job(sched_job); mutex_unlock(&sched_job->job_lock); /* after processing job, free memory */ kfree(sched_job);