From 40f704f2f301bcfebcbd2a04600cc14293a51da7 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 26 Aug 2021 11:17:21 +0200 Subject: [PATCH] zink: pctx can't be null here We're checking if pctx is null here, but that can't be true. If it could, then the code that follows would have immediately crashed. A quick peek at other drivers seems to indicate that this is a safe assumption. CID: 1474410, 1474554 Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/drivers/zink/zink_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_fence.c b/src/gallium/drivers/zink/zink_fence.c index e0fadd86da7..8b151480874 100644 --- a/src/gallium/drivers/zink/zink_fence.c +++ b/src/gallium/drivers/zink/zink_fence.c @@ -206,7 +206,7 @@ zink_fence_server_sync(struct pipe_context *pctx, struct pipe_fence_handle *pfen { struct zink_tc_fence *mfence = zink_tc_fence(pfence); - if (pctx && mfence->deferred_ctx == pctx) + if (mfence->deferred_ctx == pctx) return; if (mfence->deferred_ctx) {