aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-27 17:44:05 +0100
committerErik Faye-Lund <[email protected]>2019-11-29 09:54:25 +0100
commit7a63124a06b4737199301956513b7627bcaf24ac (patch)
tree232428df146b0cbee41bb65bd697db845683e347 /src
parentc8769ff8dd2eb9c9698f9608f97256708d6f1009 (diff)
zink: error-check right variable
That's not the value we just allocated... CoverityID: 1455177 Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c
index 99b9e5833bc..32d5283c217 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/spirv_builder.c
@@ -840,7 +840,7 @@ get_const_def(struct spirv_builder *b, SpvOp op, SpvId type,
}
struct spirv_const *cnst = CALLOC_STRUCT(spirv_const);
- if (!type)
+ if (!cnst)
return 0;
cnst->op = op;