From: Stephen Boyd <sboyd@kernel.org>
To: "Onur Özkan" <work@onurozkan.dev>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: mturquette@baylibre.com, bmasney@redhat.com,
daniel.almeida@collabora.com, "Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH v1] clk: devres: fix cleanup in devm_clk_get_optional_enabled_with_rate()
Date: Thu, 13 Aug 2026 22:40:15 -0700 [thread overview]
Message-ID: <178668601557.5897.11262008307765555513@lazor> (raw)
In-Reply-To: <20260801111637.304590-1-work@onurozkan.dev>
Quoting Onur Özkan (2026-08-01 04:16:34)
> devm_clk_get_optional_enabled_with_rate() registers its cleanup action
> before setting the clock rate. If setting the rate fails, it attempts to
> disable and unprepare a clock that was never enabled. This issue was
> spotted while reviewing "rust: clk: add devres-managed clks" [1].
>
> Register the cleanup action only after successfully preparing and enabling
> the clock.
>
> [1]: https://lore.kernel.org/rust-for-linux/20260706-clk-type-state-v5-3-67c5f326a16c@collabora.com
>
> Fixes: 9934a1bd45b2 ("clk: provide devm_clk_get_optional_enabled_with_rate()")
> Signed-off-by: Onur Özkan <work@onurozkan.dev>
> ---
Applied to clk-next
prev parent reply other threads:[~2026-08-14 5:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-01 11:16 Onur Özkan
2026-08-03 13:28 ` Brian Masney
2026-08-14 5:40 ` Stephen Boyd [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=178668601557.5897.11262008307765555513@lazor \
--to=sboyd@kernel.org \
--cc=bmasney@redhat.com \
--cc=daniel.almeida@collabora.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=work@onurozkan.dev \
/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®