From: "tip-bot2 for Yang Yingliang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Yang Yingliang <yangyingliang@huawei.com>,
Tony Lindgren <tony@atomide.com>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
Date: Fri, 09 Dec 2022 15:47:22 -0000 [thread overview]
Message-ID: <167060084258.4906.16638898488037471774.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221029114427.946520-1-yangyingliang@huawei.com>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 180d35a7c05d520314a590c99ad8643d0213f28b
Gitweb: https://git.kernel.org/tip/180d35a7c05d520314a590c99ad8643d0213f28b
Author: Yang Yingliang <yangyingliang@huawei.com>
AuthorDate: Sat, 29 Oct 2022 19:44:27 +08:00
Committer: Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Fri, 02 Dec 2022 13:16:46 +01:00
clocksource/drivers/timer-ti-dm: Fix missing clk_disable_unprepare in dmtimer_systimer_init_clock()
If clk_get_rate() fails which is called after clk_prepare_enable(),
clk_disable_unprepare() need be called in error path to disable the
clock in dmtimer_systimer_init_clock().
Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20221029114427.946520-1-yangyingliang@huawei.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
drivers/clocksource/timer-ti-dm-systimer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c
index 2737407..632523c 100644
--- a/drivers/clocksource/timer-ti-dm-systimer.c
+++ b/drivers/clocksource/timer-ti-dm-systimer.c
@@ -345,8 +345,10 @@ static int __init dmtimer_systimer_init_clock(struct dmtimer_systimer *t,
return error;
r = clk_get_rate(clock);
- if (!r)
+ if (!r) {
+ clk_disable_unprepare(clock);
return -ENODEV;
+ }
if (is_ick)
t->ick = clock;
prev parent reply other threads:[~2022-12-09 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-29 11:44 [PATCH v2] clocksource/drivers/timer-ti-dm: fix " Yang Yingliang
2022-10-31 8:28 ` Tony Lindgren
2022-12-09 15:47 ` tip-bot2 for Yang Yingliang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=167060084258.4906.16638898488037471774.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=daniel.lezcano@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tony@atomide.com \
--cc=x86@kernel.org \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®