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]
Date:   Mon, 4 Jul 2022 02:48:22 +0000
From:   Yuan Can <yuancan@...wei.com>
To:     <lee.jones@...aro.org>
CC:     <linux-kernel@...r.kernel.org>, <yuancan@...wei.com>
Subject: [PATCH -next] mfd: tc6393xb: Add missing clk_disable_unprepare() in tc6393xb_resume()

Add clk_disable_unprepare() on error path in tc6393xb_resume().

Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Yuan Can <yuancan@...wei.com>
---
 drivers/mfd/tc6393xb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 0be5731685b4..1f1aa76292d2 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -850,8 +850,10 @@ static int tc6393xb_resume(struct platform_device *dev)
 		return ret;
 
 	ret = tcpd->resume(dev);
-	if (ret)
+	if (ret) {
+		clk_disable_unprepare(tc6393xb->clk);
 		return ret;
+	}
 
 	if (!tcpd->resume_restore)
 		return 0;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ