drm/amdgpu: Use kzalloc instead of kmalloc+__GFP_ZERO in amdgpu_ras.c
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Tue, 19 Dec 2023 13:56:22 +0000 (19:26 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jan 2024 16:16:06 +0000 (11:16 -0500)
commit091411be7ae899ce23072acf5a83b0b43e9024e1
tree4f29d6accd0e8799294ae028093d02acb0f785f1
parentabaf0666a65b8bbf7311571cd2b32b076fb8e1f9
drm/amdgpu: Use kzalloc instead of kmalloc+__GFP_ZERO in amdgpu_ras.c

Fixes the below smatch warnings:

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2543 amdgpu_ras_recovery_init() warn: Please consider using kzalloc instead of kmalloc
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2830 amdgpu_ras_init() warn: Please consider using kzalloc instead of kmalloc

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c