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/imagination: Use pvr_vm_context_get()

I missed this open-coded kref_get() while trying to debug a refcount
bug, so let's use the helper function here to avoid that waste of time
again in the future.

Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8616641d-6005-4b25-bc0a-0b53985a0e08@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>

authored by

Matt Coster and committed by
Matt Coster
eb4accc5 c7d84a45

+1 -3
+1 -3
drivers/gpu/drm/imagination/pvr_vm.c
··· 636 636 637 637 xa_lock(&pvr_file->vm_ctx_handles); 638 638 vm_ctx = xa_load(&pvr_file->vm_ctx_handles, handle); 639 - if (vm_ctx) 640 - kref_get(&vm_ctx->ref_count); 641 - 639 + pvr_vm_context_get(vm_ctx); 642 640 xa_unlock(&pvr_file->vm_ctx_handles); 643 641 644 642 return vm_ctx;