All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>
Cc: linux-rtc@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: Re: [PATCH] rtc: ma35d1: release the clock reference on probe failure
Date: Wed, 04 Nov 2026 03:00:34 +0000	[thread overview]
Message-ID: <sashiko-outbox-196559@kernel.org> (raw)
In-Reply-To: <20261104025339.1527356-1-vulab@iscas.ac.cn>

> ma35d1_rtc_probe() gets the RTC clock with of_clk_get() and enables it
> with clk_prepare_enable(). The clock reference is never dropped and the
> clock is never disabled, not on the many later error returns and not on
> success either, since the driver has no remove callback. The reference
> and the enabled clock are leaked for every probe attempt.
> 
> Use devm_clk_get_enabled(), which ties both the reference and the
> enabled state to the device lifetime.
> 
> Fixes: dc0684adf3b6 ("rtc: Add driver for Nuvoton ma35d1 rtc controller")
> Cc: stable@vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104025339.1527356-1-vulab@iscas.ac.cn?part=1


  reply	other threads:[~2026-11-04  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  2:53 [PATCH] rtc: ma35d1: release the clock reference on probe failure Wentao Liang
2026-11-04  3:00 ` sashiko-bot [this message]
2026-11-04  7:10 ` Krzysztof Kozlowski

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-196559@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-rtc@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vulab@iscas.ac.cn \
    /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.