gallium/radeon: remove redundant null-pointer check
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 28 Jun 2016 07:40:26 +0000 (09:40 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 6 Jul 2016 08:42:48 +0000 (10:42 +0200)
v2: keep using r600_texture_reference

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 0a25dbe..614dd0e 100644 (file)
@@ -560,8 +560,7 @@ static void r600_texture_destroy(struct pipe_screen *screen,
        struct r600_texture *rtex = (struct r600_texture*)ptex;
        struct r600_resource *resource = &rtex->resource;
 
-       if (rtex->flushed_depth_texture)
-               r600_texture_reference(&rtex->flushed_depth_texture, NULL);
+       r600_texture_reference(&rtex->flushed_depth_texture, NULL);
 
        r600_resource_reference(&rtex->htile_buffer, NULL);
        if (rtex->cmask_buffer != &rtex->resource) {