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
This commit is contained in:
@@ -54,7 +54,8 @@ static inline struct lima_vm *lima_vm_get(struct lima_vm *vm)
|
||||
|
||||
static inline void lima_vm_put(struct lima_vm *vm)
|
||||
{
|
||||
kref_put(&vm->refcount, lima_vm_release);
|
||||
if (vm)
|
||||
kref_put(&vm->refcount, lima_vm_release);
|
||||
}
|
||||
|
||||
void lima_vm_print(struct lima_vm *vm);
|
||||
|
Reference in New Issue
Block a user