AMD General

Reviewed-by: Asad Kamal <[email protected]>

Thanks & Regards
Asad

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Yang Wang
Sent: Thursday, May 7, 2026 1:43 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Zhang, Hawking 
<[email protected]>; Xiao, Jack <[email protected]>
Subject: [PATCH] drm/amdgpu: fix error return code in mes_v12_1_map_test_bo

The function mes_v12_1_map_test_bo incorrectly returned 0 unconditionallyon 
error path, which would hide the real error code and mislead upperlayers about 
the failure status.
Fix it by returning the correct error code 'r' instead of 0.

Fixes: 5ba87c3e9e4b ("drm/amdgpu/mes_v12_1: add mes self test");

Signed-off-by: Yang Wang <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c
index 1931562ea6b3..4217b3fea0f3 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c
@@ -2063,7 +2063,7 @@ static int mes_v12_1_map_test_bo(struct amdgpu_device 
*adev,

 error:
        amdgpu_sync_free(&sync);
-       return 0;
+       return r;
 }

 static int mes_v12_1_test_ring(struct amdgpu_device *adev, int xcc_id,
--
2.47.3

Reply via email to