drm: amdgpu: Allow NULL pointers at amdgpu_vm_put_task_info()
Allow NULL pointers at amdgpu_vm_put_task_info() as it common practice for "put" or "free" functions. This avoid an extra check for NULL for callers. Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/20250617124949.2151549-2-andrealmeid@igalia.com Signed-off-by: André Almeida <andrealmeid@igalia.com>
This commit is contained in:
@@ -2447,7 +2447,8 @@ amdgpu_vm_get_vm_from_pasid(struct amdgpu_device *adev, u32 pasid)
|
||||
*/
|
||||
void amdgpu_vm_put_task_info(struct amdgpu_task_info *task_info)
|
||||
{
|
||||
kref_put(&task_info->refcount, amdgpu_vm_destroy_task_info);
|
||||
if (task_info)
|
||||
kref_put(&task_info->refcount, amdgpu_vm_destroy_task_info);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user