From: sashiko-bot@kernel.org
To: "Xiangwu Lai" <laixiangwu@cmss.chinamobile.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v2] serial: sc16is7xx: Fix clock leak on invalid clock frequency
Date: Fri, 13 Nov 2026 10:42:52 +0000 [thread overview]
Message-ID: <sashiko-outbox-212632@kernel.org> (raw)
In-Reply-To: <20261113103855.2144-1-laixiangwu@cmss.chinamobile.com>
> sc16is7xx_probe() enables the clock with clk_prepare_enable() early
> in the probe path. If the resulting clock frequency cannot be
> determined (neither from the clock itself, nor from the
> "clock-frequency" property or platform data), the driver bails out
> with -EINVAL, but it does so with a plain return, leaving the clock
> prepared and enabled.
>
> Switch to devm_clk_get_optional_enabled(), which drops the clock
> reference and disables the clock automatically when the probe fails
> and when the device is removed. The manual clock management is no
> longer needed: drop clk_prepare_enable(), the out_clk label and the
> clk_disable_unprepare() call in sc16is7xx_remove().
>
> Fixes: cb1b206cff46 ("serial: sc16is7xx: Use devm_clk_get_optional()")
> Suggested-by: Hugo Villeneuve <hugo@hugovil.com>
> Signed-off-by: Xiangwu Lai <laixiangwu@cmss.chinamobile.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113103855.2144-1-laixiangwu@cmss.chinamobile.com?part=1
prev parent reply other threads:[~2026-11-13 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 10:38 [PATCH v2] serial: sc16is7xx: Fix clock leak on invalid clock frequency Xiangwu Lai
2026-11-13 10:42 ` sashiko-bot [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=sashiko-outbox-212632@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=laixiangwu@cmss.chinamobile.com \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.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;
as well as URLs for NNTP newsgroup(s).