From 04bd5bb69ba3f33b7e018620eae5e8b6a6da7734 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 19 Nov 2021 16:00:15 +0200 Subject: [PATCH] anv: don't try to close fd = -1 CID: 1464334 Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Jason Ekstrand Part-of: --- src/intel/vulkan/anv_allocator.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 28a3b9c..286e21c 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -155,10 +155,8 @@ anv_state_table_init(struct anv_state_table *table, * userptr and send a chunk of it off to the GPU. */ table->fd = os_create_anonymous_file(BLOCK_POOL_MEMFD_SIZE, "state table"); - if (table->fd == -1) { - result = vk_error(device, VK_ERROR_INITIALIZATION_FAILED); - goto fail_fd; - } + if (table->fd == -1) + return vk_error(device, VK_ERROR_INITIALIZATION_FAILED); if (!u_vector_init(&table->cleanups, 8, sizeof(struct anv_state_table_cleanup))) { -- 2.7.4