summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_state.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-09-21 21:13:33 -0700
committerMatt Turner <[email protected]>2014-12-08 17:02:19 -0800
commit9019e5e19532fe214fc6e45b9ee1f60bbe332456 (patch)
treec382866b78653aea157f085c9cdb8bd3695798e8 /src/gallium/drivers/i915/i915_state.c
parentcae7a2a0319e31eef0975edafc730efd3bd2c8d4 (diff)
Remove useless checks for NULL before freeing
See commits 5067506e and b6109de3 for the Coccinelle script. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915/i915_state.c')
-rw-r--r--src/gallium/drivers/i915/i915_state.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index c90fcfd7491..6ba9646f7ab 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -628,12 +628,10 @@ void i915_delete_fs_state(struct pipe_context *pipe, void *shader)
FREE(ifs->decl);
ifs->decl = NULL;
- if (ifs->program) {
- FREE(ifs->program);
- ifs->program = NULL;
- FREE((struct tgsi_token *)ifs->state.tokens);
- ifs->state.tokens = NULL;
- }
+ FREE(ifs->program);
+ ifs->program = NULL;
+ FREE((struct tgsi_token *)ifs->state.tokens);
+ ifs->state.tokens = NULL;
ifs->program_len = 0;
ifs->decl_len = 0;