Skip to content

Commit 12f7605

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: fix error handling in amdgpu_bo_list_get()
We should not leak the pointer where we couldn't grab the reference on to the caller because it can be that the error handling still tries to put the reference then. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent bff3315 commit 12f7605

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
172172
}
173173

174174
rcu_read_unlock();
175+
*result = NULL;
175176
return -ENOENT;
176177
}
177178

0 commit comments

Comments
 (0)