From: William Breathitt Gray <wbg@kernel.org>
To: Stepan Ionichev <sozdayvek@gmail.com>
Cc: William Breathitt Gray <wbg@kernel.org>,
Andy Shevchenko <andriy.shevchenko@intel.com>,
m32285159@gmail.com, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] counter: ti-eqep: use devm for runtime PM to fix probe error path
Date: Sun, 2 Aug 2026 21:59:01 +0900 [thread overview]
Message-ID: <20260802125903.1425262-1-wbg@kernel.org> (raw)
In-Reply-To: <ah--yK0SXW4TC2xC@ashevche-desk.local>
On Wed, Jun 03, 2026 at 08:42:32AM +0300, Andy Shevchenko wrote:
> On Fri, May 29, 2026 at 02:58:34PM +0500, Stepan Ionichev wrote:
> > ti_eqep_probe() enables runtime PM and takes a reference manually,
> > then returns directly via dev_err_probe() if devm_clk_get_enabled()
> > fails, leaking the runtime PM enable and usage count.
>
> > v2 tried to
> > route that error through a manual cleanup label, but mixing a
> > devm-managed resource (the clock) with a manual pm_runtime unwind
> > is itself wrong: the devm clock release runs after the manual
> > unwind, in the wrong order.
>
> It sounds like unneeded detail (because started with what v2 did, which
> is part of rather changelog or cover letter). Perhaps we may rephrase
> that in a way that "Manual cleanup via goto will mix the managed resource
> allocations and unmanaged that leads to a wrong order on the release."
>
> Also note devm-managed is tautology since 'm' is for managed.
Stepan,
Do you have any disagreements with Andy's suggestions? I'll be happy to
merge a v4 of this patch if you rephrase the description as suggested.
Thanks,
William Breathitt Gray
next prev parent reply other threads:[~2026-08-02 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 9:58 [PATCH v3] counter: ti-eqep: use devm for runtime PM to fix probe error path Stepan Ionichev
2026-06-03 5:42 ` Andy Shevchenko
2026-08-02 12:59 ` William Breathitt Gray [this message]
2026-06-04 2:19 ` William Breathitt Gray
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=20260802125903.1425262-1-wbg@kernel.org \
--to=wbg@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m32285159@gmail.com \
--cc=nuno.sa@analog.com \
--cc=sozdayvek@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.