summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-09-16 15:22:51 -0600
committerBrian Paul <[email protected]>2016-09-21 12:23:45 -0600
commit99d9f764b22e80865f8ff9b402a11a4334e5bbd0 (patch)
treebb0c6d8191d482f6d94409b3ec9602a43c6a94df /src/gallium
parent1cc7a76d730f4a31e01bd5ffbe9407764963d61b (diff)
svga: minor simplification in svga_validate_surface_view()
Get rid of unneeded local var. Reviewed-by: Charmaine Lee <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_surface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/svga/svga_surface.c b/src/gallium/drivers/svga/svga_surface.c
index 42636bc82fe..7cc7ef1b452 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;
}