Fixed warning reported by kernel test robot: 1.warning: no previous prototype for function 'amdgpu_ras_block_late_init_default'. 2.warning: variable 'ras_obj' is used uninitialized whenever '||' condition is true. Signed-off-by: yipechai <YiPeng.Chai@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index e5874df3c9ca..a73567ea03d5 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; @@ -2456,7 +2456,7 @@ int amdgpu_ras_block_late_init(struct amdgpu_device *adev, return r; } -int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, +static int amdgpu_ras_block_late_init_default(struct amdgpu_device *adev, struct ras_common_if *ras_block) { return amdgpu_ras_block_late_init(adev, ras_block); -- 2.25.1