From 201b09a443e752429e9f69eafbd70123ce409cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 4 Jun 2015 18:57:57 +0200 Subject: [PATCH] amdgpu: fix double mutex_unlock in amdgpu_bo_import The handles array is used below, which is followed by another unlock, so remove the first one. Reviewed-by: Alex Deucher --- amdgpu/amdgpu_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c index eca2c6ff..66f1b9fd 100644 --- a/amdgpu/amdgpu_bo.c +++ b/amdgpu/amdgpu_bo.c @@ -452,10 +452,10 @@ int amdgpu_bo_import(amdgpu_device_handle dev, atomic_set(&bo->refcount, 1); bo->dev = dev; pthread_mutex_init(&bo->cpu_access_mutex, NULL); - pthread_mutex_unlock(&dev->bo_table_mutex); r = amdgpu_bo_map(bo, 1 << 20); if (r) { + pthread_mutex_unlock(&dev->bo_table_mutex); amdgpu_bo_reference(&bo, NULL); return r; }