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: <172564901407.2215.3378983855992950922.tip-bot2@tip-bot2>
Date: Fri, 06 Sep 2024 18:56:54 -0000
From: "tip-bot2 for Gaosheng Cui" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Gaosheng Cui <cuigaosheng1@...wei.com>,
 Michal Simek <michal.simek@....com>,
 Daniel Lezcano <daniel.lezcano@...aro.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: timers/core] clocksource/drivers/cadence-ttc: Add missing
 clk_disable_unprepare in ttc_setup_clockevent

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     2e02da1d86c97dfaa8ee083d98df1d069b28a526
Gitweb:        https://git.kernel.org/tip/2e02da1d86c97dfaa8ee083d98df1d069b28a526
Author:        Gaosheng Cui <cuigaosheng1@...wei.com>
AuthorDate:    Sat, 03 Aug 2024 14:42:53 +08:00
Committer:     Daniel Lezcano <daniel.lezcano@...aro.org>
CommitterDate: Fri, 06 Sep 2024 14:49:21 +02:00

clocksource/drivers/cadence-ttc: Add missing clk_disable_unprepare in ttc_setup_clockevent

Add the missing clk_disable_unprepare() before return in
ttc_setup_clockevent().

Signed-off-by: Gaosheng Cui <cuigaosheng1@...wei.com>
Reviewed-by: Michal Simek <michal.simek@....com>
Link: https://lore.kernel.org/r/20240803064253.331946-3-cuigaosheng1@huawei.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
 drivers/clocksource/timer-cadence-ttc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/timer-cadence-ttc.c b/drivers/clocksource/timer-cadence-ttc.c
index ca7a064..b8a1cf5 100644
--- a/drivers/clocksource/timer-cadence-ttc.c
+++ b/drivers/clocksource/timer-cadence-ttc.c
@@ -435,7 +435,7 @@ static int __init ttc_setup_clockevent(struct clk *clk,
 				    &ttcce->ttc.clk_rate_change_nb);
 	if (err) {
 		pr_warn("Unable to register clock notifier.\n");
-		goto out_kfree;
+		goto out_clk_unprepare;
 	}
 
 	ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk);
@@ -465,13 +465,15 @@ static int __init ttc_setup_clockevent(struct clk *clk,
 	err = request_irq(irq, ttc_clock_event_interrupt,
 			  IRQF_TIMER, ttcce->ce.name, ttcce);
 	if (err)
-		goto out_kfree;
+		goto out_clk_unprepare;
 
 	clockevents_config_and_register(&ttcce->ce,
 			ttcce->ttc.freq / PRESCALE, 1, 0xfffe);
 
 	return 0;
 
+out_clk_unprepare:
+	clk_disable_unprepare(ttcce->ttc.clk);
 out_kfree:
 	kfree(ttcce);
 	return err;

Powered by blists - more mailing lists