From: Tapio Reijonen <tapio.reijonen@vaisala.com>
To: Hugo Villeneuve <hugo@hugovil.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: max310x: simplify clock management with devm_clk_get_optional_enabled()
Date: Sun, 6 Dec 2026 09:39:59 +0200 [thread overview]
Message-ID: <d26bb148-d1ee-478d-bd30-e8e5c1cd51f2@vaisala.com> (raw)
In-Reply-To: <20261202162824.34779-1-hugo@hugovil.com>
On 12/2/26 18:28, Hugo Villeneuve wrote:
> -out_clk:
> - clk_disable_unprepare(s->clk);
> -
> return ret;
> }
Hi Hugo,
This overlaps with patches of mine that are on the list, so two notes.
The use-after-free in max310x_remove() that the Sashiko reply to this
patch points at is what patch 1/3 of this series fixes:
[PATCH 0/3] serial: max310x: teardown ordering and CTS locking fixes
<20261120-max310x-teardown-fixes-v1-0-eb52c8b612df@vaisala.com>
Patches 1/3 and 2/3 of it change the same lines as this patch: the end
of max310x_remove() and the error exits of max310x_probe(), where 2/3
sends the exits that come before any port is registered to out_clk.
Patch 1/7 of
[PATCH 0/7] serial: core: Power the line transceiver with the port
<20261111-serial-transceiver-supply-v1-0-40bad0f912f2@vaisala.com>
adds two more jumps to out_clk. It applies on top of this patch, but
does not build then, as the label is gone.
With the clock managed by devm those jumps become plain returns, so
the rebase is small in either order. If this patch is applied first I
rebase both series on it.
The change itself looks right to me: the clock is now released by
devres after remove() has returned, and after the gpiochip and the
interrupt, which were requested later in probe.
Reviewed-by: Tapio Reijonen <tapio.reijonen@vaisala.com>
If you have time to look at the teardown series, a review would be
very welcome.
Best regards,
Tapio
prev parent reply other threads:[~2026-12-06 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 16:28 [PATCH] serial: max310x: simplify clock management with devm_clk_get_optional_enabled() Hugo Villeneuve
2026-12-02 16:40 ` sashiko-bot
2026-12-06 7:39 ` Tapio Reijonen [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=d26bb148-d1ee-478d-bd30-e8e5c1cd51f2@vaisala.com \
--to=tapio.reijonen@vaisala.com \
--cc=gregkh@linuxfoundation.org \
--cc=hugo@hugovil.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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