nir: only dereference undef after NULL check. (v2)
authorDave Airlie <airlied@redhat.com>
Sun, 17 Apr 2016 20:56:06 +0000 (06:56 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 17 Apr 2016 21:37:48 +0000 (07:37 +1000)
Pointed out by coverity.

v2: nuke line, Jason pointed out the constructor does it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/nir/nir_builder.h

index 29b13fb222f4ca483b24635ff4a66c2a125489a0..35d65b4a5cfe95fd398c2b993eceb98ed07e1c7a 100644 (file)
@@ -79,7 +79,6 @@ nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size)
 {
    nir_ssa_undef_instr *undef =
       nir_ssa_undef_instr_create(build->shader, num_components, bit_size);
-   undef->def.bit_size = bit_size;
    if (!undef)
       return NULL;