Commit 2d8b3a9b authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs()

commit 40a9960b upstream.

We shifted some code around in commit 9cca0b8e ("drm/amdgpu: move
amdgpu_cs_sysvm_access_required into find_mapping") and now my static
checker complains that "r" might not be initialized at the end of the
function.  I've reviewed the code, and that seems possible, but it's
also possible I may have missed something.
Reviewed-by: default avatarChristian König <>
Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarAlex Deucher <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 23506bc7
......@@ -647,7 +647,7 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx)
uint32_t allocated = 0;
uint32_t tmp, handle = 0;
uint32_t *size = &tmp;
int i, r, idx = 0;
int i, r = 0, idx = 0;
p->job->vm = NULL;
ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment