From: Chad Versace Date: Thu, 21 May 2015 02:51:10 +0000 (-0700) Subject: vk: Fix result of vkCreateInstance X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a61f3079967e774b40d27e378c463fb52a89558e;p=mesa.git vk: Fix result of vkCreateInstance When fill_physical_device() fails, don't return VK_SUCCESS. --- diff --git a/src/vulkan/device.c b/src/vulkan/device.c index f6578d01341..3c245cd036b 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -142,9 +142,11 @@ VkResult anv_CreateInstance( instance->physicalDeviceCount = 0; result = fill_physical_device(&instance->physicalDevice, instance, "/dev/dri/renderD128"); - if (result == VK_SUCCESS) - instance->physicalDeviceCount++; + if (result != VK_SUCCESS) + return result; + + instance->physicalDeviceCount++; *pInstance = (VkInstance) instance; return VK_SUCCESS;