summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2018-02-09 12:15:45 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:19:57 -0500
commited024578e703da96c71339a73cf5c3ff4317dd9a (patch)
tree948089ec4ed1183b5421b16dca862d9b9d25967a /drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
parent15b9bc9aa8b551a59f555a61bc575c167e201adc (diff)
drm/amdgpu: Fix potential uninitialized use of 'idle' in amdgpu_ids.c
v2: Use NULL and reverse christmas tree ordering Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
index 7d2805729c20..563e74755aab 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
@@ -406,7 +406,8 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
struct amdgpu_device *adev = ring->adev;
unsigned vmhub = ring->funcs->vmhub;
struct amdgpu_vmid_mgr *id_mgr = &adev->vm_manager.id_mgr[vmhub];
- struct amdgpu_vmid *id, *idle;
+ struct amdgpu_vmid *idle = NULL;
+ struct amdgpu_vmid *id = NULL;
int r = 0;
mutex_lock(&id_mgr->lock);