igt_pipe_crc_free() does that check already.

Signed-off-by: Damien Lespiau <damien.lesp...@intel.com>
---
 tests/kms_rotation_crc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 75cfff8..d196c7c 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -88,9 +88,7 @@ static bool prepare_crtc(data_t *data, igt_output_t *output, 
enum pipe pipe,
        igt_display_commit(display);
 
        /* create the pipe_crc object for this pipe */
-       if (data->pipe_crc)
-               igt_pipe_crc_free(data->pipe_crc);
-
+       igt_pipe_crc_free(data->pipe_crc);
        data->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
        if (!data->pipe_crc) {
                igt_info("auto crc not supported on this connector with pipe 
%i\n",
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to