Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1352830ybh; Thu, 23 Jul 2020 06:53:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9DBCkCW8KzrAvJg5otaRflM6Q7oZOr2LGooVhWkhOThhMk9/1mLh+9nmu3unzcQ+Ghx4P X-Received: by 2002:a17:906:fcab:: with SMTP id qw11mr4443249ejb.456.1595512411023; Thu, 23 Jul 2020 06:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595512411; cv=none; d=google.com; s=arc-20160816; b=gXGo0YrPRAU5R5znPVIoxkUa2mkgGsFOwSxwxhwbNonqblCiFkV62wwm9A8qrrMRQX b06JWuJ6jDgNZ25yCG8uWYrx9/VUq4BsKtlOHKv1OPaO1P60nYo3FBnauVJfr0xiTvMi FRPqct6F11gRIrLCKQwHki8b86EI5Cb96+Um5fhA+mhGD6TSYc+0PiuXAebieqn37NFt c44/6bDUB4FonkIkgkmhSw3N89rOYiFFEWTRSq4RvaKp9AeKzb5dw4SqoGfpZrK3c6yF 8rHhMHBpnM+lpmW6IpR9MYZUOFbilLeWAAI4m8aM0E2m/RVEFp4WtB9mySRkfhu6yRsN fYBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=p3pTNZMs0Co8HSRLuxgx+ra6lY54Ifu742adT9Ty5xY=; b=D11hMhnPRaEDBl/Iz7SKgyc8tONE8OLwe0B0Mfg3pv5SYnq5KF5JJT7a5maJ/AJHgT ah7GxWzzdjSDiw2TuyNfmeg8m2YWQFrn4XlUputNfKSaH8N7UoW0ZtqtzIA/rYPrd0Wf 1uOdI+hN/pvFBkmbocUtbMcOGi8sWfilBGP2VVJYoKs2Ee/u4p9DvXmwNyiP5G1m2Ubn fZ9TYXJSFKSMxdDZcggCXh8t5w/BUKyyIZHK5fESBqwkLvn0M4kYKXp7Y+Ghq9q70pYf tVNzcfKOOKttREO9H+THcO03vsYeI+bZJKbSH2OkhzAlB7Vt3S3QcUBLBs4Ea3HTjb1H Z4/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YOuWGFzG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf11si2146031ejb.475.2020.07.23.06.53.07; Thu, 23 Jul 2020 06:53:31 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YOuWGFzG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728066AbgGWNw4 (ORCPT + 99 others); Thu, 23 Jul 2020 09:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726521AbgGWNw4 (ORCPT ); Thu, 23 Jul 2020 09:52:56 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9AAC0619DC for ; Thu, 23 Jul 2020 06:52:55 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id a15so5237650wrh.10 for ; Thu, 23 Jul 2020 06:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p3pTNZMs0Co8HSRLuxgx+ra6lY54Ifu742adT9Ty5xY=; b=YOuWGFzGLdaS8sm/4P693z/q9JjhWvmhyhFplKGUqSRHHyBRTgEA59O7Z47QFiQvpU UzStdAD1j6xaxcTfNTvyBXxChNNnPcM6jJUG8HVtyTzyBq4ELzoQzMdZxy34SlfLEzHW dHohAAM0reRYYgZQmFS1bNrCNr3wNah2/OqE7fO9rjNbJkbmwWGHoDKjvz4Ujn/gzgVh qjpIxoNbckBJ5iPIJyP4ABG5NK/Dc5/8u9AZxdlzl4rP2pSl3q8Y9fTH4l2cyb9Vf/Bf SOWeR7V/+N5dXtEJidhNYOjw3geeykDGZRwPxeFxaHPvKDLk5/QL14t41L7KbMa2W5Kc PD8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p3pTNZMs0Co8HSRLuxgx+ra6lY54Ifu742adT9Ty5xY=; b=f2Bc1EzYzfp1FgMhJLxkzQlLvh54rNZSJkUqy1MDijLwfiFhvLy0cGE3j7AoljY1dW zQFfYRBd490S5gaErEsgLwo/I90VkodDT+H+oo62y8ZtxgsgnPf3jiL0h0mv3Z16Y6L7 dXbofS9eCDMQslGJ+wtdEbNnxBwybWasHOjx+UeOmuosYyp51AvbKSeza+58n5Nem7Fp hzk22lq5oe1g+e/jBvhBRVn8w/g0FLi6J2KfJmoVjR0F+h51EGxteKJbQitPvlFuCFt9 djhCwh7koodxFBTuikbbl5G0guWxm83nZL8bak1DsLqszv1lqGd7Wmx6bZAnrDiO3wGK Z39A== X-Gm-Message-State: AOAM530vAqqor8Rl4TSSfCg3k5IcVa209qqsyHVHngTq4cvSpBNgsbdR 5LdvHjImvJbqdCggnqoh0vqLABKMMNE0NJxOppKLRw== X-Received: by 2002:adf:a351:: with SMTP id d17mr4116950wrb.111.1595512374316; Thu, 23 Jul 2020 06:52:54 -0700 (PDT) MIME-Version: 1.0 References: <1595474863-33112-1-git-send-email-liheng40@huawei.com> <1595474863-33112-2-git-send-email-liheng40@huawei.com> In-Reply-To: <1595474863-33112-2-git-send-email-liheng40@huawei.com> From: Alex Deucher Date: Thu, 23 Jul 2020 09:52:43 -0400 Message-ID: Subject: Re: [PATCH -next 2/2] drm: Remove redundant NULL check To: Li Heng Cc: Dave Airlie , Daniel Vetter , Maling list - DRI developers , amd-gfx list , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 12:11 AM Li Heng wrote: > > 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 Applied. Thanks! Alex > --- > 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 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx