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>] [day] [month] [year] [list]
Message-Id: <20251112-icc-clk-disable-cleanup-v1-1-fa4794bf5cc8@gmail.com>
Date: Wed, 12 Nov 2025 21:42:41 +0100
From: Gabor Juhos <j4g8y7@...il.com>
To: Georgi Djakov <djakov@...nel.org>
Cc: Dmitry Baryshkov <lumag@...nel.org>, linux-pm@...r.kernel.org, 
 linux-kernel@...r.kernel.org, Gabor Juhos <j4g8y7@...il.com>
Subject: [PATCH] interconnect: icc-clk: clear enabled flag only when it is
 set

It is pointless to clear the enabled flag when it is cleared already, so
change the code to do that only when the flag is set.

Signed-off-by: Gabor Juhos <j4g8y7@...il.com>
---
 drivers/interconnect/icc-clk.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/interconnect/icc-clk.c b/drivers/interconnect/icc-clk.c
index 93c030608d3e0aad7d9c1ed81a51dcde0d3f85ab..6bbafe8fc6bdf6c036eafab6db8b68687611d6b6 100644
--- a/drivers/interconnect/icc-clk.c
+++ b/drivers/interconnect/icc-clk.c
@@ -31,9 +31,10 @@ static int icc_clk_set(struct icc_node *src, struct icc_node *dst)
 		return 0;
 
 	if (!src->peak_bw) {
-		if (qn->enabled)
+		if (qn->enabled) {
 			clk_disable_unprepare(qn->clk);
-		qn->enabled = false;
+			qn->enabled = false;
+		}
 
 		return 0;
 	}

---
base-commit: 41aa8dd5b19c447686b68e6730d348ecc0373143
change-id: 20251027-icc-clk-disable-cleanup-5468c1d8eb0e

Best regards,
-- 
Gabor Juhos <j4g8y7@...il.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ