aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu/amdgpu_bo.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-06-04 18:57:57 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-08-05 13:47:51 -0400
commit201b09a443e752429e9f69eafbd70123ce409cb0 (patch)
tree70fc0db2e5933d8bbc4f6408bc973d46a421f6d2 /amdgpu/amdgpu_bo.c
parent7d7f25c938439bfe977bb51614ce4be80ffd3f45 (diff)
downloadexternal_libdrm-201b09a443e752429e9f69eafbd70123ce409cb0.tar.gz
external_libdrm-201b09a443e752429e9f69eafbd70123ce409cb0.tar.bz2
external_libdrm-201b09a443e752429e9f69eafbd70123ce409cb0.zip
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 <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_bo.c')
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 1 insertions, 1 deletions
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;
}