zink: remove needless NULL-check
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Thu, 26 Aug 2021 09:27:33 +0000 (11:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Aug 2021 18:32:03 +0000 (18:32 +0000)
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@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12559>

src/gallium/drivers/zink/zink_fence.c

index 8b15148..931d88f 100644 (file)
@@ -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
        */