Commit 17cf678a authored by Colin Ian King's avatar Colin Ian King Committed by Alex Deucher

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: 6817bf28 ("drm/amdgpu: grab the id mgr lock while accessing passid_mapping")
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dab8f7e9
......@@ -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;
......
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