mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
drm/amdgpu: Free resources of bo_list when idr_alloc fails
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian König<christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
74c31c6e61
commit
a5d20c405a
@ -83,7 +83,7 @@ static int amdgpu_bo_list_create(struct amdgpu_device *adev,
|
||||
r = idr_alloc(&fpriv->bo_list_handles, list, 1, 0, GFP_KERNEL);
|
||||
mutex_unlock(&fpriv->bo_list_lock);
|
||||
if (r < 0) {
|
||||
kfree(list);
|
||||
amdgpu_bo_list_free(list);
|
||||
return r;
|
||||
}
|
||||
*id = r;
|
||||
|
Loading…
Reference in New Issue
Block a user