Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1181535pxu; Fri, 27 Nov 2020 01:27:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhOb4xFVqvL793/wV7pw9b3gITnXke3pLAEnoPDyLB6LrkX391UiXcv/SLl5lYpOZHFZZQ X-Received: by 2002:aa7:c5d0:: with SMTP id h16mr6527420eds.381.1606469269524; Fri, 27 Nov 2020 01:27:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606469269; cv=none; d=google.com; s=arc-20160816; b=Wjxt/xLfvPhlSDNaSCrpMFrfI+joV9iPrnQqE7d/mDlk7I/F0zVuzqnTFeXaWqhEm4 lGZEsdJk6t2EYnDcg/3kRmYRDmsxi8ccCL8Jzom+LEcB5mEJO/f0aD88eg5WgPhoN/yX QY+fvX2UH3aykUuaQLXGnIIu/r3sXAg/rPo80cjk/jBlf8TflsiKU5+ytkGW+2sKl3GM pLziLIwYPmv4vdpButc7ggVmQsXCDkq762BanlTcjVnB9scHjuuN22ZpsOGqK7mOahPU y1PPj8ASDFPkjE8Izo+XPvC86pemY6ObdlCdmYa2FzL5sR5wpZg3c+D1FJjTHXC2CGSu WcFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=YsUZhGwykcovzeaeTc3Z4ezcuQaKbRjH8ZgTB4YxjOs=; b=bsYzBKpDkQ+VPXzrXxrBronRPRvzbFMZLykF575+Yw0dSiihMBrKz+YItABvfmAwWn weAPgHdAbhNi0PjG20xxNtTIgqBr9oVKQJQrhvI7zALK7OiQ1PfxOn7b4IL5BRpaWxZc mRLiQC31Bt3nOO6rf7belBocEDKqNB2jJQPlUvXd34Aj9Rm02fWhAwOmJdKwK3bmCC8M R4nPLeA4E1L4CCcdEiZK8Hgqg+X7DcdiMbDxN4chEkwL92yuc84Q1ImOLYDsy5/4wj6w UUXbCEdBA5LWqxmD1t47mPvgw+yLQmGnNjqEIME3r0XZv+AhwAywrFbXrZdHvdu7rgIy 60xA== 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 v22si4674871edl.293.2020.11.27.01.27.27; Fri, 27 Nov 2020 01:27:49 -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; 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 S1727913AbgK0JYE (ORCPT + 99 others); Fri, 27 Nov 2020 04:24:04 -0500 Received: from smtp25.cstnet.cn ([159.226.251.25]:48184 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726736AbgK0JYD (ORCPT ); Fri, 27 Nov 2020 04:24:03 -0500 Received: from localhost.localdomain (unknown [124.16.141.242]) by APP-05 (Coremail) with SMTP id zQCowAD3kgiWxcBfuYsQAA--.27737S2; Fri, 27 Nov 2020 17:23:35 +0800 (CST) From: Xu Wang To: a.hajda@samsung.com, narmstrong@baylibre.com, Laurent.pinchart@ideasonboard.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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: bridge: dw-hdmi: Remove redundant null check before clk_disable_unprepare Date: Fri, 27 Nov 2020 09:23:32 +0000 Message-Id: <20201127092332.50879-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowAD3kgi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07jztCwUUUUU= X-Originating-IP: [124.16.141.242] X-CM-SenderInfo: pyxotu46lvutnvoduhdfq/1tbiCwoNA1z4jnGRGgAAsf Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Because clk_disable_unprepare() already checked NULL clock parameter, so the additional check is unnecessary, just remove them. Signed-off-by: Xu Wang --- 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); -- 2.17.1