[Mesa-dev] [PATCH] svga: Remove svga_hwtnl_simple_draw_range_elements dead code.

Vinson Lee vlee at freedesktop.org
Sat Oct 26 10:12:28 CEST 2013


Remove dead code left behind by commit
8d7b913e4e089cc8b0b800cbcf80737d0be0a0f7.

Fixes "Logically dead code" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/gallium/drivers/svga/svga_draw_elements.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index c52ca2d..f9ba66f 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -105,7 +105,6 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
                                        unsigned start,
                                        unsigned count )
 {
-   struct pipe_resource *upload_buffer = NULL;
    SVGA3dPrimitiveRange range;
    unsigned hw_prim;
    unsigned hw_count;
@@ -130,13 +129,8 @@ svga_hwtnl_simple_draw_range_elements( struct svga_hwtnl *hwtnl,
    range.indexBias = index_bias;
 
    ret = svga_hwtnl_prim( hwtnl, &range, min_index, max_index, index_buffer );
-   if (ret != PIPE_OK)
-      goto done;
 
 done:
-   if (upload_buffer)
-      pipe_resource_reference( &upload_buffer, NULL );
-
    return ret;
 }
 
-- 
1.8.3.2



More information about the mesa-dev mailing list