Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1098074pxb; Tue, 3 Nov 2020 23:15:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8oKH7IAlFKK7TT0ZxIf/INKTZF+Iqi313rdDCqXPuP6PAHJjLX5fFB8iD5N1Vel7rhv7X X-Received: by 2002:a17:906:6d83:: with SMTP id h3mr23405622ejt.481.1604474143565; Tue, 03 Nov 2020 23:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604474143; cv=none; d=google.com; s=arc-20160816; b=ttI6hFQ8VcLQUluRTTdPLSQ74R+VQng5X3dkQzE07Hk028pVjVyqeBwuodDqhQxX4j gvaOsOPwcTxIL6M1YlC8hhaLPRR/rMrpktrbrgn5NIv229nbYIy2W6tPDtIBSg6amd1n AUt90hKKdwEY1Scl6sNUtDkUvoYquPIjgDfs2jO3Shekgcpu/hfDogHHXhY1vbqf6s86 ISzKBaOmsGq8OSibx1UTQmpH70YfyctyK/R+06VtN6QomIzdCb++Ry4xgU7/MiGBp7AB TBpLsfohS7TF0Tn61WFDOcpgx9wm2TNyVhK/rtOhqFDonb7jFM5y5EMyPAvyLjgFbXeN em/w== 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=Y5xPBFLc78ezck+jupv0UHINsBzD0sK/8CzLlB50ECk=; b=uXPHyJsOaQbBBmoy6kq/80aH3NaCiBBSDF2D0xOwXY+26lZtzGSoo2Jz+LN36tIotV DCaJzqIwhXhuw6o+oII94IfHdOu9UNsX42Hh92egyEywxktNE4SJ0r9+TP4JWe0ltlx8 U5t6ge6IZntMuhiSvKSsYQuCvZVYxnxkBNfnzVuYjb42NndSGspDncCJX73MR46i+ccr 6OxYIYdB/6XO/FIh5zy0u3bpWmUkLZZekjk/kJz+lkfrAuxk9j3SyVoitagixFMPaRbp nQFCO3Lw+LsStms2QVU9al+zgD/35NnPr7W6DNrzwCI2n1jdxCidwP2Ac2UW0h3Ijms6 9Y4w== 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 a11si821834ejb.159.2020.11.03.23.15.20; Tue, 03 Nov 2020 23:15:43 -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 S1728711AbgKDHNb (ORCPT + 99 others); Wed, 4 Nov 2020 02:13:31 -0500 Received: from smtp25.cstnet.cn ([159.226.251.25]:47908 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725926AbgKDHNb (ORCPT ); Wed, 4 Nov 2020 02:13:31 -0500 Received: from localhost.localdomain (unknown [124.16.141.241]) by APP-05 (Coremail) with SMTP id zQCowACHj8MUVKJfePP7AA--.26397S2; Wed, 04 Nov 2020 15:11:16 +0800 (CST) From: Xu Wang To: paul@crapouillou.net, mturquette@baylibre.com, sboyd@kernel.org, linux-clk@vger.kernel.or Cc: linux-kernel@vger.kernel.org Subject: [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable Date: Wed, 4 Nov 2020 07:11:14 +0000 Message-Id: <20201104071114.6322-1-vulab@iscas.ac.cn> X-Mailer: git-send-email 2.17.1 X-CM-TRANSID: zQCowACHj8MUVKJfePP7AA--.26397S2 X-Coremail-Antispam: 1UD129KBjvdXoW7Xr1fCFy5uF1UXr4fGw15urg_yoWfZrgEkF 40qr4SkF4rCrn7Ar1UAwn5AFyI9F1xZ3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.org Because clk_enable and clk_disable already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Xu Wang --- drivers/clk/ingenic/tcu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ingenic/tcu.c b/drivers/clk/ingenic/tcu.c index 9382dc3aa27e..ffcb3667fd2b 100644 --- a/drivers/clk/ingenic/tcu.c +++ b/drivers/clk/ingenic/tcu.c @@ -445,8 +445,7 @@ static int __maybe_unused tcu_pm_suspend(void) { struct ingenic_tcu *tcu = ingenic_tcu; - if (tcu->clk) - clk_disable(tcu->clk); + clk_disable(tcu->clk); return 0; } @@ -455,8 +454,7 @@ static void __maybe_unused tcu_pm_resume(void) { struct ingenic_tcu *tcu = ingenic_tcu; - if (tcu->clk) - clk_enable(tcu->clk); + clk_enable(tcu->clk); } static struct syscore_ops __maybe_unused tcu_pm_ops = { -- 2.17.1