From 71466eb863e9433461edd2b04e6cb69f0457f573 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 20 Aug 2023 17:53:09 -0700 Subject: [PATCH] vk/wsi/x11: Remove dead code Fix defect reported by Coverity Scan. Logically dead code (DEADCODE) dead_error_line: Execution cannot reach this statement: return VK_ERROR_SURFACE_LOS.... Fixes: fb9f697fbb8 ("vk/wsi/x11: move surface alpha check from get_caps to creation") Signed-off-by: Vinson Lee Reviewed-by: Adam Jackson Reviewed-By: Mike Blumenkrantz Part-of: --- src/vulkan/wsi/wsi_common_x11.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 0f9dad6..6dd22b5 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -705,8 +705,6 @@ x11_surface_get_capabilities(VkIcdSurfaceBase *icd_surface, } free(err); free(geom); - if (!geom) - return VK_ERROR_SURFACE_LOST_KHR; if (surface->has_alpha) { caps->supportedCompositeAlpha = VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR | -- 2.7.4