From 004ac58509d601c4be5c7905ccd9ce0f647df05e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 20 May 2020 15:32:05 +0200 Subject: [PATCH] amdgpu: fix unitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit clang warning: variable 'va_handle' is used uninitialized whenever 'if' condition is false Reviewed-by: Marek Olšák Part-of: --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 0aef34acd2d..e359f1aa41d 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -477,7 +477,7 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws, amdgpu_bo_handle buf_handle; uint64_t va = 0; struct amdgpu_winsys_bo *bo; - amdgpu_va_handle va_handle; + amdgpu_va_handle va_handle = NULL; int r; /* VRAM or GTT must be specified, but not both at the same time. */ -- 2.30.2