i965: remove unnecessary null check
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 28 Jul 2016 00:24:57 +0000 (10:24 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 28 Jul 2016 01:05:57 +0000 (11:05 +1000)
We would have hit a segfault already if this could be null.

Fixes Coverity warning spotted by Matt.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_gs.c

index 67a2480..dd1ec4b 100644 (file)
@@ -163,10 +163,7 @@ brw_codegen_gs_prog(struct brw_context *brw,
                      &prog_data, gs->Program->nir, prog,
                      st_index, &program_size, &error_str);
    if (program == NULL) {
-      if (prog) {
-         ralloc_strcat(&prog->InfoLog, error_str);
-      }
-
+      ralloc_strcat(&prog->InfoLog, error_str);
       _mesa_problem(NULL, "Failed to compile geometry shader: %s\n", error_str);
 
       ralloc_free(mem_ctx);