From: Paul Cercueil <paul@crapouillou.net>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: mturquette@baylibre.com, sboyd@kernel.org,
linux-clk@vger.kernel.or, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable
Date: Wed, 04 Nov 2020 11:17:02 +0000 [thread overview]
Message-ID: <ECR9JQ.NFV4ZB9VUP182@crapouillou.net> (raw)
In-Reply-To: <20201104071114.6322-1-vulab@iscas.ac.cn>
Hi,
Le mer. 4 nov. 2020 à 7:11, Xu Wang <vulab@iscas.ac.cn> a écrit :
> 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>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> 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
>
prev parent reply other threads:[~2020-11-04 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 7:11 Xu Wang
2020-11-04 11:17 ` Paul Cercueil [this message]
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=ECR9JQ.NFV4ZB9VUP182@crapouillou.net \
--to=paul@crapouillou.net \
--cc=linux-clk@vger.kernel.or \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=vulab@iscas.ac.cn \
/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®