gallium/swr: Remove unreachable code.
authorVinson Lee <vlee@freedesktop.org>
Fri, 25 Sep 2020 00:56:08 +0000 (17:56 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 28 Sep 2020 23:06:18 +0000 (23:06 +0000)
pContextMem has already been checked and cannot be NULL.

Fix defect reported by Coverity Scan.

Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return tsCtx;

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6857>

src/gallium/drivers/swr/rasterizer/core/tessellator.h

index 26e6d54..30b6b4f 100644 (file)
@@ -166,10 +166,6 @@ INLINE HANDLE SWR_API
     }
 
     HANDLE tsCtx = pContextMem;
-    if (!tsCtx)
-    {
-        return tsCtx;
-    }
 
     SWR_TS* pTessellator = new (tsCtx) SWR_TS();
     SWR_ASSERT(pTessellator == tsCtx);