From cfed3fb89bea1704745aac2b71cdfeb0f3d16a35 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: (cherry picked from commit 71466eb863e9433461edd2b04e6cb69f0457f573) --- .pick_status.json | 2 +- src/vulkan/wsi/wsi_common_x11.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3b7bd47c7cc..c0dc22d8084 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -10304,7 +10304,7 @@ "description": "vk/wsi/x11: Remove dead code", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "fb9f697fbb8f836aaf12a269195841e36b93adf2", "notes": null diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 0f9dad6a0e4..6dd22b5804b 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 |