From 29c9b6cd581de79ef848a50d1c9f06cf567bfd78 Mon Sep 17 00:00:00 2001 From: yipechai Date: Wed, 23 Feb 2022 11:05:43 +0800 Subject: [PATCH] drm/amdgpu: Fixed warning reported by kernel test robot Fixed warning reported by kernel test robot: 1.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true. Signed-off-by: yipechai Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 0e89175..b53abc1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -2400,7 +2400,7 @@ bool amdgpu_ras_is_poison_mode_supported(struct amdgpu_device *adev) int amdgpu_ras_block_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block) { - struct amdgpu_ras_block_object *ras_obj; + struct amdgpu_ras_block_object *ras_obj = NULL; struct amdgpu_ras *con = amdgpu_ras_get_context(adev); unsigned long ue_count, ce_count; int r; -- 2.7.4