]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: fix amdgpu_mn_unlock() in the CS error path
authorChristian König <christian.koenig@amd.com>
Mon, 3 Sep 2018 08:51:51 +0000 (10:51 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Sep 2018 03:40:24 +0000 (22:40 -0500)
Avoid unlocking a lock we never locked.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

index 349dcc37ee649fef311c77d0ea3cd766fe8475bf..04a2733b5ccc4817151dd15ecb325fc466a19616 100644 (file)
@@ -1247,10 +1247,10 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
 error_abort:
        dma_fence_put(&job->base.s_fence->finished);
        job->base.s_fence = NULL;
+       amdgpu_mn_unlock(p->mn);
 
 error_unlock:
        amdgpu_job_free(job);
-       amdgpu_mn_unlock(p->mn);
        return r;
 }