[Mesa-dev] [PATCH 10/10] nv50: drop obsolete check from error path

Emil Velikov emil.l.velikov at gmail.com
Thu Jan 16 10:44:59 PST 2014


At 'out_err' the nv50_context has been calloc-ated.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/nouveau/nv50/nv50_context.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_context.c b/src/gallium/drivers/nouveau/nv50/nv50_context.c
index 24264d5..10e8b47 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_context.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_context.c
@@ -298,15 +298,13 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
    return pipe;
 
 out_err:
-   if (nv50) {
-      if (nv50->bufctx_3d)
-         nouveau_bufctx_del(&nv50->bufctx_3d);
-      if (nv50->bufctx)
-         nouveau_bufctx_del(&nv50->bufctx);
-      if (nv50->blit)
-         FREE(nv50->blit);
-      FREE(nv50);
-   }
+   if (nv50->bufctx_3d)
+      nouveau_bufctx_del(&nv50->bufctx_3d);
+   if (nv50->bufctx)
+      nouveau_bufctx_del(&nv50->bufctx);
+   if (nv50->blit)
+      FREE(nv50->blit);
+   FREE(nv50);
    return NULL;
 }
 
-- 
1.8.5.2



More information about the mesa-dev mailing list