etnaviv: remove dead code
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 29 Nov 2019 14:15:27 +0000 (15:15 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 29 Nov 2019 15:22:40 +0000 (16:22 +0100)
ptiled is always NULL so the if statement is useless.

CoverityID: 1415572
Fixes: b9627765303 ("etnaviv: rework compatible render base")
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_resource.c

index f4200be437d9cdd5094b8cdff5a76f8820eee652..03b3ef8719e5036d30a21897fc459574973fb11d 100644 (file)
@@ -494,7 +494,6 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
    struct etna_resource *rsc;
    struct etna_resource_level *level;
    struct pipe_resource *prsc;
-   struct pipe_resource *ptiled = NULL;
 
    DBG("target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, "
        "nr_samples=%u, usage=%u, bind=%x, flags=%x",
@@ -568,8 +567,6 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
 
 fail:
    etna_resource_destroy(pscreen, prsc);
-   if (ptiled)
-      etna_resource_destroy(pscreen, ptiled);
 
    return NULL;
 }