Skip to content

Commit d3c7059

Browse files
peppsacalexdeucher
authored andcommitted
drm/amdgpu: init return value in amdgpu_ttm_clear_buffer
Otherwise an uninitialized value can be returned if amdgpu_res_cleared returns true for all regions. Possibly closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3812 Fixes: a68c7ea ("drm/amdgpu: Enable clear page functionality") Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 7c62aac) Cc: [email protected]
1 parent 4de141b commit d3c7059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ int amdgpu_ttm_clear_buffer(struct amdgpu_bo *bo,
22812281
struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
22822282
struct amdgpu_res_cursor cursor;
22832283
u64 addr;
2284-
int r;
2284+
int r = 0;
22852285

22862286
if (!adev->mman.buffer_funcs_enabled)
22872287
return -EINVAL;

0 commit comments

Comments
 (0)