anv: don't try to close fd = -1

CID: 1464334

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13879>
This commit is contained in:
Lionel Landwerlin
2021-11-19 16:00:15 +02:00
committed by Marge Bot
parent ddbc84d5a0
commit 04bd5bb69b

View File

@@ -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))) {