summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c12
-rw-r--r--src/gallium/drivers/nv50/nv50_screen.c6
2 files changed, 6 insertions, 12 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index 72d14a6e3a0..0d292f7ab89 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -343,8 +343,7 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset)
NOUVEAU_ERR("shader translation failed: %i\n", ret);
goto out;
}
- if (info->bin.syms) /* we don't need them yet */
- FREE(info->bin.syms);
+ FREE(info->bin.syms);
prog->code = info->bin.code;
prog->code_size = info->bin.codeSize;
@@ -428,14 +427,11 @@ nv50_program_destroy(struct nv50_context *nv50, struct nv50_program *p)
if (p->mem)
nouveau_heap_free(&p->mem);
- if (p->code)
- FREE(p->code);
+ FREE(p->code);
- if (p->fixups)
- FREE(p->fixups);
+ FREE(p->fixups);
- if (p->so)
- FREE(p->so);
+ FREE(p->so);
memset(p, 0, sizeof(*p));
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
index 3d510ea5f35..beb81d66476 100644
--- a/src/gallium/drivers/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nv50/nv50_screen.c
@@ -267,8 +267,7 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
if (screen->base.pushbuf)
screen->base.pushbuf->user_priv = NULL;
- if (screen->blitctx)
- FREE(screen->blitctx);
+ FREE(screen->blitctx);
nouveau_bo_ref(NULL, &screen->code);
nouveau_bo_ref(NULL, &screen->tls_bo);
@@ -281,8 +280,7 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
nouveau_heap_destroy(&screen->gp_code_heap);
nouveau_heap_destroy(&screen->fp_code_heap);
- if (screen->tic.entries)
- FREE(screen->tic.entries);
+ FREE(screen->tic.entries);
nouveau_object_del(&screen->tesla);
nouveau_object_del(&screen->eng2d);