mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories()
commit78aa02c713upstream. After commitea09729c93("drm/amdgpu: rework page directory filling v2") then it becomes a lot harder to verify that "r" is initialized. My static checker complains and so I've reviewed the code. It does look like it might be buggy... Anyway, it doesn't hurt to set "r" to zero at the start. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d316675a9d
commit
9cd48ba5fc
@@ -744,7 +744,7 @@ error_free:
|
||||
int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
|
||||
struct amdgpu_vm *vm)
|
||||
{
|
||||
int r;
|
||||
int r = 0;
|
||||
|
||||
r = amdgpu_vm_update_pd_or_shadow(adev, vm, true);
|
||||
if (r)
|
||||
|
||||
Reference in New Issue
Block a user