]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: init return value in amdgpu_ttm_clear_buffer
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 20 Feb 2025 13:41:59 +0000 (14:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 17:25:39 +0000 (18:25 +0100)
commitd2c9625b0ade41f9917875d88173a0cc802b95fc
tree92d4ea3376c0f542f1bbec2b31b98dd2aea0f005
parent98ef70dd9814dd1d5fba82a1ed194ac41ba2c362
drm/amdgpu: init return value in amdgpu_ttm_clear_buffer

commit d3c7059b6a8600fc62cd863f1ea203b8675e63e1 upstream.

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: a68c7eaa7a8f ("drm/amdgpu: Enable clear page functionality")
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7c62aacc3b452f73a1284198c81551035fac6d71)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c