nv50: drop obsolete check from error path
authorEmil Velikov <emil.l.velikov@gmail.com>
Thu, 16 Jan 2014 17:36:43 +0000 (17:36 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 18 Jan 2014 19:17:45 +0000 (19:17 +0000)
At 'out_err' the nv50_context has been calloc-ated.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_context.c

index 24264d5adbe51a37e01ff88c0a1e85c0076b1ef2..10e8b47b38ee586475a93b55e866fff51740ab6d 100644 (file)
@@ -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;
 }