From: Pierre-Eric Pelloux-Prayer Date: Wed, 20 May 2020 13:32:05 +0000 (+0200) Subject: amdgpu: fix unitialized variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=004ac58509d601c4be5c7905ccd9ce0f647df05e;p=mesa.git amdgpu: fix unitialized variable clang warning: variable 'va_handle' is used uninitialized whenever 'if' condition is false Reviewed-by: Marek Olšák Part-of: --- 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. */