From: Bas Nieuwenhuizen Date: Thu, 14 Jun 2018 22:01:43 +0000 (+0200) Subject: ac: Clear meminfo to avoid valgrind warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4714f698bf1eda6ee77304f8abe0a92be7a55e7;p=mesa.git ac: Clear meminfo to avoid valgrind warning. Somehow valgrind misses that the value is initialized by the ioctl. Reviewed-by: Dave Airlie Reviewed-by: Samuel Pitoiset --- diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index e908cc6fa96..e885c0538e9 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -235,7 +235,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, } if (info->drm_minor >= 9) { - struct drm_amdgpu_memory_info meminfo; + struct drm_amdgpu_memory_info meminfo = {}; r = amdgpu_query_info(dev, AMDGPU_INFO_MEMORY, sizeof(meminfo), &meminfo); if (r) {