drm/amdgpu: fix uninitialized variable pasid_mapping_needed
authorColin Ian King <colin.king@canonical.com>
Thu, 3 Oct 2019 21:52:27 +0000 (22:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:46:00 +0000 (16:46 +0100)
commit1c0a591d14ac588fe5f1c4ec309c0547e7608917
tree2653aa35326f9173f28ea8c2fdb655751298f48d
parent0d1716fb4fc0504323bc9cbcef0adcc604bcf332
drm/amdgpu: fix uninitialized variable pasid_mapping_needed

[ Upstream commit 17cf678a33c6196a3df4531fe5aec91384c9eeb5 ]

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 <christian.koenig@amd.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c