mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable
@ 2020-11-04  7:11 Xu Wang
  2020-11-04 11:17 ` Paul Cercueil
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-11-04  7:11 UTC (permalink / raw)
  To: paul, mturquette, sboyd, linux-clk; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-04 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04  7:11 [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable Xu Wang
2020-11-04 11:17 ` Paul Cercueil

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®