diff options
author | Faith Ekstrand <faith.ekstrand@collabora.com> | 2023-10-16 05:57:21 -0500 |
---|---|---|
committer | Faith Ekstrand <faith.ekstrand@collabora.com> | 2023-10-16 05:58:58 -0500 |
commit | 7a83109835634c5b6c4c979d83b8aeb8a7c5f421 (patch) | |
tree | a9209cff3b8f52f361966fca3ef035a74453bff8 /src/nouveau | |
parent | 922e6e5423d1562f12c913e24d2ab2e5c6e381e1 (diff) | |
download | mesa-7a83109835634c5b6c4c979d83b8aeb8a7c5f421.tar.gz mesa-7a83109835634c5b6c4c979d83b8aeb8a7c5f421.tar.bz2 mesa-7a83109835634c5b6c4c979d83b8aeb8a7c5f421.zip |
nvk: Clean up the disk cache on physical device create fail path
Fixes: a4f8fd9dd53d ("nvk: Hook up the disk cache")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25749>
Diffstat (limited to 'src/nouveau')
-rw-r--r-- | src/nouveau/vulkan/nvk_physical_device.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index a6e2ba07a81..7f8faee1026 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -813,7 +813,7 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, if (!os_get_available_system_memory(&sysmem_size_B)) { result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "Failed to query available system memory"); - goto fail_init; + goto fail_disk_cache; } if (pdev->info.vram_size_B) { @@ -844,13 +844,14 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, result = nvk_init_wsi(pdev); if (result != VK_SUCCESS) - goto fail_init; + goto fail_disk_cache; *pdev_out = &pdev->vk; return VK_SUCCESS; -fail_init: +fail_disk_cache: + nvk_physical_device_free_disk_cache(pdev); vk_physical_device_finish(&pdev->vk); fail_alloc: vk_free(&instance->vk.alloc, pdev); |