[PATCH] drm/amdgpu: fix unsigned error codes
Deucher, Alexander
Alexander.Deucher at amd.com
Wed Sep 6 16:58:45 UTC 2023
[AMD Official Use Only - General]
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: Yu, Lang <Lang.Yu at amd.com>
Sent: Wednesday, September 6, 2023 7:42 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Gopalakrishnan, Veerabadhran (Veera) <Veerabadhran.Gopalakrishnan at amd.com>; Yu, Lang <Lang.Yu at amd.com>; Dan Carpenter <dan.carpenter at linaro.org>
Subject: [PATCH] drm/amdgpu: fix unsigned error codes
Fixes: 77b13b916728 ("drm/amdgpu: add selftest framework for UMSCH")
Signed-off-by: Lang Yu <Lang.Yu at amd.com>
Reported-by: Dan Carpenter <dan.carpenter at linaro.org>
Link: https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktop
---
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 284643e1efeb..9da80b54d63e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230906/8f6241b5/attachment-0001.htm>
More information about the amd-gfx
mailing list