]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdkfd: Uninitialized pointer read
authorAndrew Martin <Andrew.Martin@amd.com>
Fri, 6 Dec 2024 19:52:34 +0000 (14:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:39:11 +0000 (10:39 -0500)
This a pointer that is being passed into other functions, so it is best to
initialize it to NULL prior.

Signed-off-by: Andrew Martin <Andrew.Martin@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c

index 52c6c5e9d264e3db0c2c3c04460f04b4e6437324..ceb9fb475ef137d00a17e8390222d2fe55533dd7 100644 (file)
@@ -1777,7 +1777,7 @@ static void kfd_fill_cache_non_crat_info(struct kfd_topology_device *dev, struct
        struct amdgpu_cu_info *cu_info = &kdev->adev->gfx.cu_info;
        struct amdgpu_gfx_config *gfx_info = &kdev->adev->gfx.config;
        int gpu_processor_id;
-       struct kfd_cache_properties *props_ext;
+       struct kfd_cache_properties *props_ext = NULL;
        int num_of_entries = 0;
        int num_of_cache_types = 0;
        struct kfd_gpu_cache_info cache_info[KFD_MAX_CACHE_TYPES];