From: Christian König Date: Mon, 3 Sep 2018 08:51:51 +0000 (+0200) Subject: drm/amdgpu: fix amdgpu_mn_unlock() in the CS error path X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b463d4e53ca9bdbf227e19b477fbfcdedaa14c84;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu: fix amdgpu_mn_unlock() in the CS error path Avoid unlocking a lock we never locked. Signed-off-by: Christian König Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index b6e9df11115d..1b5a0a73d770 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1262,10 +1262,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; }