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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent bff3315 commit 12f7605

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)