Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1012411ybh; Wed, 22 Jul 2020 20:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3prUFQycZBo/LvWsSna26p6+FHo8FX8PhIJ82GE02wc6GqHHQrjaDg27FnlqQ0PYnrkmf X-Received: by 2002:a17:906:3c56:: with SMTP id i22mr2601209ejg.12.1595474970567; Wed, 22 Jul 2020 20:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595474970; cv=none; d=google.com; s=arc-20160816; b=tvYboj9sx2dQoENF+rAR5c6BI7C999pyUxhr9ZrzuyxvI8Bsrf5zEFailAcG5CTdSj 4fx8bogmfnJFrn4u/QEiirGgIBiLgtSN4w0c+EOLIBcvyQXZ9f0mBkbkBBZAx3U/bnyb UdLFCWdCgqHt//ncMS8RU4vbRcI2PS6e7S9wB8u/iOkkZyzkGjIvXxBFDstrukTuBEUN 8W7I925/Up961+3+ogOJ0dJAapxYt44f8pzyR/aiXtaH6TT9I+sy8XyiVb6lIcqixzYW xpqP8MThuGGNyi4LraM9UpJeTZZcOzhZBG5sKAu/LVDtZWa5TKON2SMsSoZqOxjykro+ 66Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=bhz4mGVRUy9tB/KWDWC4iB8GzjM5sS9UDf5hfVdrC9k=; b=w1YJX06VCw7p+gvLpLSvDlNBKydwZ6WflEZ7rf+HGZmhEd0dJhUpyD8o0jdB+UMRd6 SW8sX5pF2oSX57KR69FpKDACrgnZROZXEg57FRv3r8qU6aOR8zVQ4aWT+Z82gpqBPirF pufqXMJW06s08UO5k1+d6xm5w8tRf8dQEGW/TM+oYThg8wSkfQ0gBboNOLk9QL0toXs7 U9r3BiVQqC0xSDCipAAh4FBkewsxTpyggDP8u1xDewy74HNR8Xt3SFgjeF79PIb5B3P+ BKkRMEc9B4z9n/7UymHcZYH7R/FjmDUy9APCaIlKF+D9lyZZViwg7WUgtR86w2gPrCYi xCSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si1256724edf.278.2020.07.22.20.29.07; Wed, 22 Jul 2020 20:29:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387749AbgGWD0U (ORCPT + 99 others); Wed, 22 Jul 2020 23:26:20 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8255 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733229AbgGWD0T (ORCPT ); Wed, 22 Jul 2020 23:26:19 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 70B83B62C633E077C39E; Thu, 23 Jul 2020 11:26:14 +0800 (CST) Received: from huawei.com (10.175.104.57) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 23 Jul 2020 11:26:10 +0800 From: Li Heng To: , CC: , , Subject: [PATCH -next 2/2] drm: Remove redundant NULL check Date: Thu, 23 Jul 2020 11:27:43 +0800 Message-ID: <1595474863-33112-2-git-send-email-liheng40@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595474863-33112-1-git-send-email-liheng40@huawei.com> References: <1595474863-33112-1-git-send-email-liheng40@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.57] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix below warnings reported by coccicheck: ./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c:557:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: 4d55b0dd1cdd ("drm/amd/display: Add DCN3 CLK_MGR") Signed-off-by: Li Heng --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c index d94fdc5..d8af56a 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c @@ -553,8 +553,7 @@ void dcn3_clk_mgr_construct( void dcn3_clk_mgr_destroy(struct clk_mgr_internal *clk_mgr) { - if (clk_mgr->base.bw_params) - kfree(clk_mgr->base.bw_params); + kfree(clk_mgr->base.bw_params); if (clk_mgr->wm_range_table) dm_helpers_free_gpu_mem(clk_mgr->base.ctx, DC_MEM_ALLOC_TYPE_GART, -- 2.7.4