Skip to content

Commit

Permalink
drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse…
Browse files Browse the repository at this point in the history
…_cs()

We shifted some code around in commit 9cca0b8 ("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: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Dan Carpenter authored and Alex Deucher committed Nov 8, 2017
1 parent 0d1da3c commit 40a9960
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,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);
Expand Down

0 comments on commit 40a9960

Please sign in to comment.