drm/amdgpu: fix unsigned error codes
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix unsigned error codes
Fixes 77b13b916728 ("drm/amdgpu: add selftest framework for UMSCH")
Signed-off-by Lang Yu <[email protected]>
Reported-by Dan Carpenter <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +3 -4
@@ -335,11 +335,10 @@ static int setup_umsch_mm_test(struct amdgpu_device *adev,if (r) goto error_free_vm; - test->pasid =amdgpu_pasid_alloc (16 ); -if (test->pasid <0 ) { - r = test->pasid; + r =amdgpu_pasid_alloc (16 ); +if (r <0 ) goto error_fini_vm; - } + test->pasid = r; r = amdgpu_bo_create_kernel(adev, sizeof(struct umsch_mm_test_ctx_data), PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
Signature · 1 line
2.25.1
[AMD Official Use Only - General]
Reviewed-by Alex Deucher <[email protected]>
________________________________
From: Yu, Lang <[email protected]>
Sent: Wednesday, September 6, 2023 7:42 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Gopalakrishnan, Veerabadhran (Veera) <[email protected]>; Yu, Lang <[email protected]>; Dan Carpenter <[email protected]>
Subject: [PATCH] drm/amdgpu: fix unsigned error codes
Fixes 77b13b916728 ("drm/amdgpu: add selftest framework for UMSCH")
Signed-off-by Lang Yu <[email protected]>
Reported-by Dan Carpenter <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +3 -4
@@ -335,11 +335,10 @@ static int setup_umsch_mm_test(struct amdgpu_device *adev,if (r) goto error_free_vm; - test->pasid =amdgpu_pasid_alloc (16 ); -if (test->pasid <0 ) { - r = test->pasid; + r =amdgpu_pasid_alloc (16 ); +if (r <0 ) goto error_fini_vm; - } + test->pasid = r; r = amdgpu_bo_create_kernel(adev, sizeof(struct umsch_mm_test_ctx_data), PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
--
2.25.1