From: Dave Airlie Date: Thu, 4 Oct 2018 23:56:19 +0000 (+1000) Subject: anv: add missing unlock in error path. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29a7631986b10c99d5daad1a571716086a325bd5;p=mesa.git anv: add missing unlock in error path. Not going to matter, but be consistent. Found by coverity Reviewed-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Fixes: caf41c78c (anv/allocator: Support softpin in the BO cache) --- diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index f62d48ae3fe..67f2f73aa11 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1358,6 +1358,7 @@ anv_bo_cache_import(struct anv_device *device, if ((new_flags & EXEC_OBJECT_PINNED) && (bo->bo.flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) != (bo_flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS)) { + pthread_mutex_unlock(&cache->mutex); return vk_errorf(device->instance, NULL, VK_ERROR_INVALID_EXTERNAL_HANDLE, "The same BO was imported on two different heaps");