diff options
author | Matt Turner <[email protected]> | 2014-09-21 21:13:33 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-08 17:02:19 -0800 |
commit | 9019e5e19532fe214fc6e45b9ee1f60bbe332456 (patch) | |
tree | c382866b78653aea157f085c9cdb8bd3695798e8 /src/gallium/drivers/nouveau/nvc0 | |
parent | cae7a2a0319e31eef0975edafc730efd3bd2c8d4 (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/nouveau/nvc0')
-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 |
3 files changed, 3 insertions, 6 deletions
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 |