Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3649191pxu; Sun, 20 Dec 2020 10:08:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/Jp3yCmiWJ4XAzEPAy7xOTcy7hJ5XsLC6cZgxO8zLK+Z1p6pB5muPkF0mdNNAhzi9NAhx X-Received: by 2002:a17:906:4443:: with SMTP id i3mr10903447ejp.133.1608487688062; Sun, 20 Dec 2020 10:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608487688; cv=none; d=google.com; s=arc-20160816; b=YVXJwBtPfmdmvMs97i2p3/wozqMCXhHkxmGcYzVSrjcOaLBYdqgxNO6RzvKQGcTNy8 FQVtiXbZnc7YhQFoDfgoQWsqJegAEkdIKgxGnLjmNS2VMY/aygx51l0yRwDXROVeZV8f WkIHdxJVrKswtdpcz406vVa3dBO7JVdK4Y0PDBo75vo5oNx/zC4ZTRXNdVjhfJ2OX+Aq VQRB8i2VorFD5Hq95ZYgFnrn3GMq5pkBmy0bnQk+6Wlt8PJvA406ZHvdgiokV44NwM9R x6RfxZyijgggpJwNguLDurJxZ2IAHbYdyaGGCbFupiHEEXLdYc5uRYsL3CAt6fyR/pjC JWmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HK3x6kNWSPgcyjvOp7nxp2qInvMDIfWL65/2Q3rUoeQ=; b=orBINoqUy+85qIkJdxZzKlKGDLnLOEcFdgth4wqi95ON9YKI4n5R117QyJWNw2lASs z7W+9pJM7g9Q3PMC6UKQPOdSFcgL7tkVt35Us4F4mBbbY2RBSKEKGevvcNnmRfme8o2S k4muKig4BrukhaU6qB44GU+HxzjeuZM6KGz9533G+mOktMULMOmEZF5Wz/4RM/7X5KSd eVtnZWM+gn4hFV8/HnE0S4ux+CPVGQXpUgPknjy7CLTvm3Ku3ZrgFJENMCWqgzUiddTA v/VaG00QA8SXWtZgrWOm5cStNXLLkEx0gkInvQuelpbaTYMH6ospbeN5sVCbWE9ll8lE TLkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ofpM1sqZ; 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 e14si9419929edy.505.2020.12.20.10.07.45; Sun, 20 Dec 2020 10:08:08 -0800 (PST) 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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=ofpM1sqZ; 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 S1727338AbgLTSGG (ORCPT + 99 others); Sun, 20 Dec 2020 13:06:06 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:51200 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726470AbgLTSGF (ORCPT ); Sun, 20 Dec 2020 13:06:05 -0500 Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4821231A; Sun, 20 Dec 2020 19:05:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1608487523; bh=/uCR53dI7SjM/vnAu1lmZpL/cHj+oSniBKFwC/k9qDs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ofpM1sqZ6h/3Bd1eikMmQ5s7IytPGwZVTd+i9mNcX9hnMTpmgqZUq7lmKNJrNhtlN Di7fiqwyPxBX5gibcm/s/rZXp+ZqahhF0QPvId1+pIo87jUGYQRBoNuN0NUida6ecz 6rXPHBvq6LpTLW8iQXox9gSMwyBalc8AGM1VPS+s= Date: Sun, 20 Dec 2020 20:05:15 +0200 From: Laurent Pinchart To: Xu Wang Cc: a.hajda@samsung.com, narmstrong@baylibre.com, jonas@kwiboo.se, jernej.skrabec@siol.net, airlied@linux.ie, daniel@ffwll.ch, sam@ravnborg.org, boris.brezillon@collabora.com, victor.liu@nxp.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm: bridge: dw-hdmi: Remove redundant null check before clk_disable_unprepare Message-ID: References: <20201127092332.50879-1-vulab@iscas.ac.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201127092332.50879-1-vulab@iscas.ac.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xu Wang, Thank you for the patch. On Fri, Nov 27, 2020 at 09:23:32AM +0000, Xu Wang wrote: > Because clk_disable_unprepare() already checked NULL clock parameter, > so the additional check is unnecessary, just remove them. > > Signed-off-by: Xu Wang Reviewed-by: Laurent Pinchart > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 0c79a9ba48bb..dda4fa9a1a08 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -3440,8 +3440,7 @@ struct dw_hdmi *dw_hdmi_probe(struct platform_device *pdev, > > err_iahb: > clk_disable_unprepare(hdmi->iahb_clk); > - if (hdmi->cec_clk) > - clk_disable_unprepare(hdmi->cec_clk); > + clk_disable_unprepare(hdmi->cec_clk); > err_isfr: > clk_disable_unprepare(hdmi->isfr_clk); > err_res: > @@ -3465,8 +3464,7 @@ void dw_hdmi_remove(struct dw_hdmi *hdmi) > > clk_disable_unprepare(hdmi->iahb_clk); > clk_disable_unprepare(hdmi->isfr_clk); > - if (hdmi->cec_clk) > - clk_disable_unprepare(hdmi->cec_clk); > + clk_disable_unprepare(hdmi->cec_clk); > > if (hdmi->i2c) > i2c_del_adapter(&hdmi->i2c->adap); -- Regards, Laurent Pinchart