Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: hpchen0nvt@gmail.com, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org,
	neil.armstrong@linaro.org,  schung@nuvoton.com, vkoul@kernel.org,
	ychuang3@nuvoton.com, stable@vger.kernel.org
Subject: Re: [PATCH] phy: nuvoton: Fix clock reference leak in ma35_usb_phy_probe()
Date: Mon, 12 Oct 2026 21:40:33 +0530	[thread overview]
Message-ID: <as0GcwfgjRsI1O8N@debian> (raw)
In-Reply-To: <20260917134353.2153788-1-vulab@iscas.ac.cn>

On Thu, Sep 17, 2026 at 01:43:53PM +0000, Wentao Liang wrote:
> ma35_usb_phy_probe() obtains the USB PHY clock with of_clk_get(), but
> returns without calling clk_put() when devm_phy_create() or
> devm_of_phy_provider_register() fails, leaking the reference.  The
> clock is only meant to be kept on the success path, where it is stored
> in p_phy->clk and used by the PHY operations.
> 
> Drop the reference on those two error paths.
> 
> Fixes: b48baf69db97 ("phy: nuvoton: add new driver for the Nuvoton MA35 SoC USB 2.0 PHY")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

- Mani

-- 
மணிவண்ணன் சதாசிவம்


      reply	other threads:[~2026-10-12 16:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 13:43 [PATCH] phy: nuvoton: Fix clock reference leak in ma35_usb_phy_probe() Wentao Liang
2026-10-12 16:10 ` Manivannan Sadhasivam [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=as0GcwfgjRsI1O8N@debian \
    --to=mani@kernel.org \
    --cc=hpchen0nvt@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=schung@nuvoton.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=vulab@iscas.ac.cn \
    --cc=ychuang3@nuvoton.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox