diff options
author | Alex Xie <AlexBin.Xie@amd.com> | 2017-07-05 18:02:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-07-14 11:06:17 -0400 |
commit | a5d20c405a37db7e59089422e795ad58feb37638 (patch) | |
tree | 302fc5b6209a858fe14ba3901e84a39877f5f474 /drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | |
parent | 74c31c6e61f3f903799986a07ab5b7c7437d456a (diff) | |
download | op-kernel-dev-a5d20c405a37db7e59089422e795ad58feb37638.zip op-kernel-dev-a5d20c405a37db7e59089422e795ad58feb37638.tar.gz |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c index f621ee1..a71b875 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c @@ -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; |