From: Damien Lespiau Subject: [PATCH i-g-t 34/43] kms_rotation_crc: No need to test for NULL before freeing the pipe CRC object Date: Thu, 10 Jul 2014 19:00:35 +0100 Message-ID: <1405015244-11370-35-git-send-email-damien.lespiau@intel.com> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id D56726E38F for ; Thu, 10 Jul 2014 11:01:42 -0700 (PDT) In-Reply-To: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org igt_pipe_crc_free() does that check already. Signed-off-by: Damien Lespiau --- 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