From 39d1576eef0cd1628c0afa8b778eea686d3035b7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 27 Oct 2020 15:46:26 -0700 Subject: [PATCH] st/nine: Remove unnecessary NULL check. resource cannot be NULL at this point since it has already been dereferenced earlier. Fix defect reported by Coverity Scan. Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking resource suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Signed-off-by: Vinson Lee Reviewed-by: Axel Davy Part-of: --- src/gallium/frontends/nine/surface9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/frontends/nine/surface9.c b/src/gallium/frontends/nine/surface9.c index 6e786e28ad0..ed1be08c5d2 100644 --- a/src/gallium/frontends/nine/surface9.c +++ b/src/gallium/frontends/nine/surface9.c @@ -834,8 +834,7 @@ NineSurface9_SetResourceResize( struct NineSurface9 *This, pipe_surface_reference(&This->surface[0], NULL); pipe_surface_reference(&This->surface[1], NULL); - if (resource) - NineSurface9_CreatePipeSurfaces(This); + NineSurface9_CreatePipeSurfaces(This); }