Mesa (master): st/nine: Remove unnecessary NULL check.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Nov 7 04:11:11 UTC 2020
Module: Mesa
Branch: master
Commit: 39d1576eef0cd1628c0afa8b778eea686d3035b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=39d1576eef0cd1628c0afa8b778eea686d3035b7
Author: Vinson Lee <vlee at freedesktop.org>
Date: Tue Oct 27 15:46:26 2020 -0700
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 <vlee at freedesktop.org>
Reviewed-by: Axel Davy <davyaxel0 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7343>
---
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);
}
More information about the mesa-commit
mailing list