Commit dbb80521 authored by Lang Yu's avatar Lang Yu Committed by Alex Deucher

drm/amdgpu: fix unsigned error codes

Fixes: 5d5eac7e ("drm/amdgpu: add selftest framework for UMSCH")
Signed-off-by: default avatarLang Yu <Lang.Yu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/all/ZPhddADtKmOuVyDq@lang-desktopSigned-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fe2b8300
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment