lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201104071114.6322-1-vulab@iscas.ac.cn>
Date:   Wed,  4 Nov 2020 07:11:14 +0000
From:   Xu Wang <vulab@...as.ac.cn>
To:     paul@...pouillou.net, mturquette@...libre.com, sboyd@...nel.org,
        linux-clk@...r.kernel.or
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] clk: ingenic/TCU: Remove NULL pointer check before clk_enable/disable

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@...as.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ