diff options
| author | Colin Ian King <[email protected]> | 2019-10-03 21:52:27 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-10-04 13:53:14 +0000 |
| commit | 17cf678a33c6196a3df4531fe5aec91384c9eeb5 (patch) | |
| tree | e50d848e7764432b7cf707a150dc1aa31120177c /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amd/display: Make some functions static (diff) | |
| download | kernel-17cf678a33c6196a3df4531fe5aec91384c9eeb5.tar.gz kernel-17cf678a33c6196a3df4531fe5aec91384c9eeb5.zip | |
drm/amdgpu: fix uninitialized variable pasid_mapping_needed
The boolean variable pasid_mapping_needed is not initialized and
there are code paths that do not assign it any value before it is
is read later. Fix this by initializing pasid_mapping_needed to
false.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 6817bf283b2b ("drm/amdgpu: grab the id mgr lock while accessing passid_mapping")
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index a2c797e34a29..be10e4b9a94d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1055,7 +1055,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job, id->oa_size != job->oa_size); bool vm_flush_needed = job->vm_needs_flush; struct dma_fence *fence = NULL; - bool pasid_mapping_needed; + bool pasid_mapping_needed = false; unsigned patch_offset = 0; int r; |
