diff options
author | Vinson Lee <vlee@freedesktop.org> | 2023-06-03 16:06:55 -0700 |
---|---|---|
committer | Eric Engestrom <eric@igalia.com> | 2023-06-08 09:59:42 +0200 |
commit | 2bc5c7a89a8decb69fe64897c65ee1a18f6be949 (patch) | |
tree | 7a5f0fc1b43286145c59e5e28e7a9ed6142d5c81 | |
parent | 8d8b4533e9dfb2c515167c5c29ae252a1b0015b0 (diff) | |
download | mesa-2bc5c7a89a8decb69fe64897c65ee1a18f6be949.tar.gz mesa-2bc5c7a89a8decb69fe64897c65ee1a18f6be949.tar.bz2 mesa-2bc5c7a89a8decb69fe64897c65ee1a18f6be949.zip |
vulkan/wsi: Remove duplicate NULL check
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return NULL;.
Fixes: eadc64ab248 ("vulkan/wsi/display: do not dereference a NULL pointer")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23415>
(cherry picked from commit a62a22c92225b02537e6cd73abedfa5466f58ee5)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_display.c | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json index 69151b6af61..50f00114fb9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1102,7 +1102,7 @@ "description": "vulkan/wsi: Remove duplicate NULL check", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "eadc64ab24842f478b4d31396c9b2900fc1d3361" }, diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index 4a6e7194c46..994f98ed8b7 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -305,9 +305,6 @@ wsi_display_alloc_connector(struct wsi_display *wsi, if (!connector) return NULL; - if (!connector) - return NULL; - connector->id = connector_id; connector->wsi = wsi; connector->active = false; |