Fixes: 77b13b916728 ("drm/amdgpu: add selftest framework for UMSCH") Signed-off-by: Lang Yu <Lang.Yu@xxxxxxx> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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