diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_tgsi.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv84_video.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_isa.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tile_cache.c | 3 |
9 files changed, 16 insertions, 30 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; diff --git a/src/gallium/drivers/ilo/shader/toy_tgsi.c b/src/gallium/drivers/ilo/shader/toy_tgsi.c index 57501eac337..65e47bf3a4a 100644 --- a/src/gallium/drivers/ilo/shader/toy_tgsi.c +++ b/src/gallium/drivers/ilo/shader/toy_tgsi.c @@ -2296,10 +2296,8 @@ add_imm(struct toy_tgsi *tgsi, enum toy_type type, const uint32_t *buf) cur_size * sizeof(new_types[0]), new_size * sizeof(new_types[0])); if (!new_buf || !new_types) { - if (new_buf) - FREE(new_buf); - if (new_types) - FREE(new_types); + FREE(new_buf); + FREE(new_types); return -1; } diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c index 1a53579b49d..2cfd5db5ea0 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_context.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c @@ -338,8 +338,7 @@ out_err: nouveau_bufctx_del(&nv50->bufctx_3d); if (nv50->bufctx) nouveau_bufctx_del(&nv50->bufctx); - if (nv50->blit) - FREE(nv50->blit); + FREE(nv50->blit); FREE(nv50); return NULL; } diff --git a/src/gallium/drivers/nouveau/nv50/nv84_video.c b/src/gallium/drivers/nouveau/nv50/nv84_video.c index 395bd7a355b..7a4670f663d 100644 --- a/src/gallium/drivers/nouveau/nv50/nv84_video.c +++ b/src/gallium/drivers/nouveau/nv50/nv84_video.c @@ -256,8 +256,7 @@ nv84_decoder_destroy(struct pipe_video_codec *decoder) nouveau_client_del(&dec->client); - if (dec->mpeg12_bs) - FREE(dec->mpeg12_bs); + FREE(dec->mpeg12_bs); FREE(dec); } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c index 3992460eb4a..7662fb50f61 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c @@ -365,8 +365,7 @@ out_err: nouveau_bufctx_del(&nvc0->bufctx_cp); if (nvc0->bufctx) nouveau_bufctx_del(&nvc0->bufctx); - if (nvc0->blit) - FREE(nvc0->blit); + FREE(nvc0->blit); FREE(nvc0); } return NULL; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c index 21be8b7240e..c156e918dc5 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c @@ -783,8 +783,7 @@ nvc0_program_destroy(struct nvc0_context *nvc0, struct nvc0_program *prog) if (prog->mem) nouveau_heap_free(&prog->mem); - if (prog->code) - FREE(prog->code); /* may be 0 for hardcoded shaders */ + FREE(prog->code); /* may be 0 for hardcoded shaders */ FREE(prog->immd_data); FREE(prog->relocs); if (prog->type == PIPE_SHADER_COMPUTE && prog->cp.syms) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index 17fe66d58db..980fd1285a6 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -1501,8 +1501,7 @@ nvc0_blitctx_create(struct nvc0_context *nvc0) void nvc0_blitctx_destroy(struct nvc0_context *nvc0) { - if (nvc0->blit) - FREE(nvc0->blit); + FREE(nvc0->blit); } void diff --git a/src/gallium/drivers/r600/r600_isa.c b/src/gallium/drivers/r600/r600_isa.c index 81544ca3dd1..4ea71035c79 100644 --- a/src/gallium/drivers/r600/r600_isa.c +++ b/src/gallium/drivers/r600/r600_isa.c @@ -89,14 +89,10 @@ int r600_isa_destroy(struct r600_isa *isa) { if (!isa) return 0; - if (isa->alu_op2_map) - free(isa->alu_op2_map); - if (isa->alu_op3_map) - free(isa->alu_op3_map); - if (isa->fetch_map) - free(isa->fetch_map); - if (isa->cf_map) - free(isa->cf_map); + free(isa->alu_op2_map); + free(isa->alu_op3_map); + free(isa->fetch_map); + free(isa->cf_map); free(isa); return 0; diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index 78534b55902..b763f526e61 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -186,8 +186,7 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, FREE(tc->transfer_map); tc->num_maps = 0; - if (tc->clear_flags) - FREE(tc->clear_flags); + FREE(tc->clear_flags); tc->clear_flags_size = 0; } |