Mesa (master): svga: minor simplification in svga_validate_surface_view()

Brian Paul brianp at kemper.freedesktop.org
Wed Sep 21 18:26:08 UTC 2016


Module: Mesa
Branch: master
Commit: 99d9f764b22e80865f8ff9b402a11a4334e5bbd0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=99d9f764b22e80865f8ff9b402a11a4334e5bbd0

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Sep 16 15:22:51 2016 -0600

svga: minor simplification in svga_validate_surface_view()

Get rid of unneeded local var.

Reviewed-by: Charmaine Lee <charmainel at vmware.com>

---

 src/gallium/drivers/svga/svga_surface.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 42636bc..7cc7ef1 100644
--- a/src/gallium/drivers/svga/svga_surface.c
+++ b/src/gallium/drivers/svga/svga_surface.c
@@ -405,9 +405,9 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
 {
    enum pipe_error ret = PIPE_OK;
    enum pipe_shader_type shader;
-   struct pipe_surface *surf = NULL;
 
    assert(svga_have_vgpu10(svga));
+   assert(s);
 
    SVGA_STATS_TIME_PUSH(svga_sws(svga),
                         SVGA_STATS_TIME_VALIDATESURFACEVIEW);
@@ -481,12 +481,11 @@ svga_validate_surface_view(struct svga_context *svga, struct svga_surface *s)
          goto done;
       }
    }
-   surf = &s->base;
    
 done:
    SVGA_STATS_TIME_POP(svga_sws(svga));
 
-   return surf;
+   return &s->base;
 }
 
 




More information about the mesa-commit mailing list