From dbb805215177ce49f37c00c4f026a62eebec19dc Mon Sep 17 00:00:00 2001 From: Lang Yu Date: Wed, 6 Sep 2023 19:15:45 +0800 Subject: drm/amdgpu: fix unsigned error codes Fixes: 5d5eac7e8303 ("drm/amdgpu: add selftest framework for UMSCH") Signed-off-by: Lang Yu Reviewed-by: Alex Deucher Reported-by: Dan Carpenter Link: https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktop Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/drm/amd/amdgpu') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c index 7341808a3558..562ed4e937ba 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c @@ -334,11 +334,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, -- cgit v1.2.3-70-g09d2