Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/lima: check vm != NULL in lima_vm_put

No need to handle this check before calling lima_vm_put.

Tested-by: Bhushan Shah <bshah@kde.org>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200421133551.31481-4-yuq825@gmail.com

Qiang Yu 24943269 d04f2a8e

+4 -6
+2 -5
drivers/gpu/drm/lima/lima_sched.c
··· 252 252 lima_mmu_switch_vm(pipe->mmu[i], vm); 253 253 } 254 254 255 - if (last_vm) 256 - lima_vm_put(last_vm); 255 + lima_vm_put(last_vm); 257 256 258 257 trace_lima_task_run(task); 259 258 ··· 415 416 lima_mmu_page_fault_resume(pipe->mmu[i]); 416 417 } 417 418 418 - if (pipe->current_vm) 419 - lima_vm_put(pipe->current_vm); 420 - 419 + lima_vm_put(pipe->current_vm); 421 420 pipe->current_vm = NULL; 422 421 pipe->current_task = NULL; 423 422
+2 -1
drivers/gpu/drm/lima/lima_vm.h
··· 54 54 55 55 static inline void lima_vm_put(struct lima_vm *vm) 56 56 { 57 - kref_put(&vm->refcount, lima_vm_release); 57 + if (vm) 58 + kref_put(&vm->refcount, lima_vm_release); 58 59 } 59 60 60 61 void lima_vm_print(struct lima_vm *vm);