Mesa (main): anv: don't try to close fd = -1
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 15:08:26 UTC 2021
Module: Mesa
Branch: main
Commit: 04bd5bb69ba3f33b7e018620eae5e8b6a6da7734
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=04bd5bb69ba3f33b7e018620eae5e8b6a6da7734
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Fri Nov 19 16:00:15 2021 +0200
anv: don't try to close fd = -1
CID: 1464334
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13879>
---
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 28a3b9c91ad..286e21c6a6b 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))) {
More information about the mesa-commit
mailing list