mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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:
parent
e252e3f348
commit
2a4f069d0f
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user