summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/lima/lima_vm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/lima/lima_vm.h')
-rw-r--r--drivers/gpu/drm/lima/lima_vm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/lima/lima_vm.h b/drivers/gpu/drm/lima/lima_vm.h
index 22aeec77d84d..3a7c74822d8b 100644
--- a/drivers/gpu/drm/lima/lima_vm.h
+++ b/drivers/gpu/drm/lima/lima_vm.h
@@ -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);