Mesa (main): zink: remove needless NULL-check

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 18:42:40 UTC 2021


Module: Mesa
Branch: main
Commit: d3a795b5284f6514844f3c62412f81a5d3b2b733
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d3a795b5284f6514844f3c62412f81a5d3b2b733

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Thu Aug 26 11:27:33 2021 +0200

zink: remove needless NULL-check

This NULL-check makes Coverity paranoid because we just dereferenced the
pointer a few lines above.

But we never call this function with a NULL-pointer here, so the NULL
check isn't needed. Let's just remove it, to calm Coverity down a bit.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559>

---

 src/gallium/drivers/zink/zink_fence.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_fence.c b/src/gallium/drivers/zink/zink_fence.c
index 8b151480874..931d88f8f36 100644
--- a/src/gallium/drivers/zink/zink_fence.c
+++ b/src/gallium/drivers/zink/zink_fence.c
@@ -100,9 +100,6 @@ tc_fence_finish(struct zink_context *ctx, struct zink_tc_fence *mfence, uint64_t
          threaded_context_flush(&ctx->base, mfence->tc_token, *timeout_ns == 0);
       }
 
-      if (!timeout_ns)
-         return false;
-
       /* this is a tc mfence, so we're just waiting on the queue mfence to complete
        * after being signaled by the real mfence
        */



More information about the mesa-commit mailing list