aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/lima/lima_sched.c
diff options
context:
space:
mode:
authorQiang Yu <[email protected]>2020-04-21 13:35:44 +0000
committerQiang Yu <[email protected]>2020-04-24 12:50:46 +0000
commit24943269e51bb6fd2810e71597b675878369e06b (patch)
treee11786b1262446edfde8d2a04e1d10ebb330fbe4 /drivers/gpu/drm/lima/lima_sched.c
parentdrm/lima: print process name and pid when task error (diff)
downloadkernel-24943269e51bb6fd2810e71597b675878369e06b.tar.gz
kernel-24943269e51bb6fd2810e71597b675878369e06b.zip
drm/lima: check vm != NULL in lima_vm_put
No need to handle this check before calling lima_vm_put. Tested-by: Bhushan Shah <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/lima/lima_sched.c')
-rw-r--r--drivers/gpu/drm/lima/lima_sched.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
index 387f9439450a..3ac5797e31fc 100644
--- a/drivers/gpu/drm/lima/lima_sched.c
+++ b/drivers/gpu/drm/lima/lima_sched.c
@@ -252,8 +252,7 @@ static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job)
lima_mmu_switch_vm(pipe->mmu[i], vm);
}
- if (last_vm)
- lima_vm_put(last_vm);
+ lima_vm_put(last_vm);
trace_lima_task_run(task);
@@ -416,9 +415,7 @@ static void lima_sched_timedout_job(struct drm_sched_job *job)
lima_mmu_page_fault_resume(pipe->mmu[i]);
}
- if (pipe->current_vm)
- lima_vm_put(pipe->current_vm);
-
+ lima_vm_put(pipe->current_vm);
pipe->current_vm = NULL;
pipe->current_task = NULL;