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>
main
Marek Olšák 2015-06-04 18:57:57 +02:00 committed by Alex Deucher
parent 7d7f25c938
commit 201b09a443
1 changed files with 1 additions and 1 deletions

View File

@ -452,10 +452,10 @@ int amdgpu_bo_import(amdgpu_device_handle dev,
atomic_set(&bo->refcount, 1); atomic_set(&bo->refcount, 1);
bo->dev = dev; bo->dev = dev;
pthread_mutex_init(&bo->cpu_access_mutex, NULL); pthread_mutex_init(&bo->cpu_access_mutex, NULL);
pthread_mutex_unlock(&dev->bo_table_mutex);
r = amdgpu_bo_map(bo, 1 << 20); r = amdgpu_bo_map(bo, 1 << 20);
if (r) { if (r) {
pthread_mutex_unlock(&dev->bo_table_mutex);
amdgpu_bo_reference(&bo, NULL); amdgpu_bo_reference(&bo, NULL);
return r; return r;
} }