From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Malathi A <malathi.a2000@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] serial: 8250_uniphier: Disable clock on probe error path
Date: Wed, 16 Sep 2026 14:07:23 +0300 [thread overview]
Message-ID: <aqp4a5YmwC1Lt1TL@ashevche-desk.local> (raw)
In-Reply-To: <20260916095438.20837-1-malathi.a2000@gmail.com>
On Wed, Sep 16, 2026 at 09:54:36AM +0000, Malathi A wrote:
> uniphier_uart_probe() calls clk_prepare_enable() on priv->clk before it
> reads the port properties, but returns directly when
> uart_read_port_properties() fails, leaving the clock prepared and
> enabled.
>
> The intent is clear from the surrounding code: the next error path, when
> serial8250_register_8250_port() fails, calls clk_disable_unprepare(), as
> does uniphier_uart_remove(). Add the missing call so the early failure
> behaves the same way.
>
> Found by smatch:
>
> drivers/tty/serial/8250/8250_uniphier.c:232 uniphier_uart_probe() warn: 'priv->clk' from clk_prepare_enable() not released on lines: 205.
Why not using devm_clk_get_enabled() instead?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-09-16 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 9:54 Malathi A
2026-09-16 11:07 ` Andy Shevchenko [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=aqp4a5YmwC1Lt1TL@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hayashi.kunihiko@socionext.com \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=malathi.a2000@gmail.com \
--cc=mhiramat@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
all inboxes | Powered by JetHome®