diff options
author | Lang Yu <Lang.Yu@amd.com> | 2023-09-06 19:15:45 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-09-11 17:09:12 -0400 |
commit | dbb805215177ce49f37c00c4f026a62eebec19dc (patch) | |
tree | 54f0e00e7ddef1da43f24a79432f9bd79188288c | |
parent | fe2b83007385979b42e914adbe3adc22921e1113 (diff) |
drm/amdgpu: fix unsigned error codes
Fixes: 5d5eac7e8303 ("drm/amdgpu: add selftest framework for UMSCH")
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktop
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 7 |
1 files 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 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, |