From: Xu Wang <vulab@iscas.ac.cn>
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 [thread overview]
Message-ID: <20201104071114.6322-1-vulab@iscas.ac.cn> (raw)
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 <vulab@iscas.ac.cn>
---
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
next reply other threads:[~2020-11-04 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 7:11 Xu Wang [this message]
2020-11-04 11:17 ` Paul Cercueil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201104071114.6322-1-vulab@iscas.ac.cn \
--to=vulab@iscas.ac.cn \
--cc=linux-clk@vger.kernel.or \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=paul@crapouillou.net \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®