zink: error-check right variable

That's not the value we just allocated...

CoverityID: 1455177
Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Erik Faye-Lund 2019-11-27 17:44:05 +01:00
parent c8769ff8dd
commit 7a63124a06

View file

@ -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;