summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi_wayland.c
diff options
context:
space:
mode:
authorRobert Foss <[email protected]>2016-05-04 08:58:27 -0400
committerEmil Velikov <[email protected]>2016-05-30 10:26:35 +0100
commit5068d307f912ebe776a273c82aa427e4d6002120 (patch)
treecba1fceff077e8841a852d8f2037dff858269676 /src/intel/vulkan/anv_wsi_wayland.c
parente382bc649b95aa2ab6e86d60b0520236b2bf2947 (diff)
anv: Fix use of uninitialized variable.
The return variable was not set for failure paths. It has now been changed to VK_ERROR_INITIALIZATION_FAILED for failure paths. Coverity: 1358944 Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: rebase against master, s/vulkan/anv/] Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_wayland.c')
-rw-r--r--src/intel/vulkan/anv_wsi_wayland.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c
index 14062638f92..e95359c22c1 100644
--- a/src/intel/vulkan/anv_wsi_wayland.c
+++ b/src/intel/vulkan/anv_wsi_wayland.c
@@ -782,12 +782,16 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
chain->display = wsi_wl_get_display(&device->instance->physicalDevice,
surface->display);
- if (!chain->display)
+ if (!chain->display) {
+ result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
goto fail;
+ }
chain->queue = wl_display_create_queue(chain->display->display);
- if (!chain->queue)
+ if (!chain->queue) {
+ result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
goto fail;
+ }
for (uint32_t i = 0; i < chain->image_count; i++) {
result = wsi_wl_image_init(chain, &chain->images[i], pAllocator);