Am 21.02.25 um 16:16 schrieb Alex Deucher: > On Fri, Feb 21, 2025 at 10:13 AM Pierre-Eric Pelloux-Prayer > <pierre-eric.pelloux-prayer@xxxxxxx> wrote: >> Otherwise an uninitialized value can be returned if >> amdgpu_res_cleared returns true for all regions. >> >> Fixes: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality") >> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@xxxxxxx> > Acked-by: Alex Deucher <alexander.deucher@xxxxxxx> Reviewed-by: Christian König <christian.koenig@xxxxxxx> > >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> index a30985c8f539..e8d7c23f22c6 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c >> @@ -2295,7 +2295,7 @@ int amdgpu_ttm_clear_buffer(struct amdgpu_bo *bo, >> struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; >> struct amdgpu_res_cursor cursor; >> u64 addr; >> - int r; >> + int r = 0; >> >> if (!adev->mman.buffer_funcs_enabled) >> return -EINVAL; >> -- >> 2.43.0 >>