Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hongling Zeng <zhongling0719@126.com>
To: vkoul@kernel.org, neil.armstrong@linaro.org, johan@kernel.org,
	 kishon@kernel.org, rogerq@ti.com
Cc: Hongling Zeng <zenghongling@kylinos.cn>,
	 linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Sashiko AI <sashiko@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v5 4/4] phy: ti-pipe3: Fix clock leak in init error path
Date: Mon, 18 May 2026 16:44:24 +0800	[thread overview]
Message-ID: <6A0AD168.4040500@126.com> (raw)
In-Reply-To: <20260518062938.48114-5-zenghongling@kylinos.cn>

-- 
Sashiko AI review ·https://sashiko.dev/#/patchset/20260518062938.48114-1-zenghongling@kylinos.cn?part=4
--
Hi:
  Resend to fix threading / delivery issues.
   Thank you for identifying these SATA mode issues. Both are pre-existing bugs in
   the current codebase and were not introduced by this series.

   This series focuses on specific EPROBE_DEFER and resource leak fixes. The SATA
   mode issues you've found are valid but affect different code paths and should be
   addressed separately to keep the patch series focused.

   I can submit follow-up patches to fix these SATA mode issues. Would you prefer
   them in v6 or as separate patches after this series?

   Best regards,
   Hongling
  

在 2026年05月18日 14:29, Hongling Zeng 写道:
> When regmap_update_bits() fails in ti_pipe3_init() for PCIe mode,
> the function returns the error without calling ti_pipe3_disable_clocks().
> This leaves the clocks permanently enabled since the PHY framework won't
> invoke the .exit callback on init failure.
>
> Fix this by adding proper clock cleanup in the PCIe error path, consistent
> with how the DPLL program error path handles cleanup.
>
> Fixes: 234738ea3390 ("phy: ti-pipe3: move clk initialization to a separate function")
> Reported-by: Sashiko AI <sashiko@kernel.org>
> Closes: https://lore.kernel.org/all/20260518023657.41852C2BCB0@smtp.kernel.org/
> Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
> Cc: stable@vger.kernel.org
>
> ---
> Change in v5:
>    -Add Fix ignored clock enable return value in init patch
> ---
>   drivers/phy/ti/phy-ti-pipe3.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/phy/ti/phy-ti-pipe3.c b/drivers/phy/ti/phy-ti-pipe3.c
> index 9ec228c2a940..4897e4ba2d7d 100644
> --- a/drivers/phy/ti/phy-ti-pipe3.c
> +++ b/drivers/phy/ti/phy-ti-pipe3.c
> @@ -518,6 +518,8 @@ static int ti_pipe3_init(struct phy *x)
>   		val = 0x96 << OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT;
>   		ret = regmap_update_bits(phy->pcs_syscon, phy->pcie_pcs_reg,
>   					 PCIE_PCS_MASK, val);
> +		if (ret)
> +			ti_pipe3_disable_clocks(phy);
>   		return ret;
>   	}
>   


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

      parent reply	other threads:[~2026-05-18  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18  6:29 [PATCH v5 0/4] phy: ti-pipe3: Fix clock resource handling issues Hongling Zeng
2026-05-18  6:29 ` [PATCH v5 1/4] phy: ti-pipe3: Fix ignored clock enable return value in init Hongling Zeng
2026-05-18  6:29 ` [PATCH v5 2/4] phy: ti: pipe3: Fix clock resource leak on probe errors Hongling Zeng
2026-05-18  6:29 ` [PATCH v5 3/4] phy: ti-pipe3: Fix EPROBE_DEFER handling for clock resources Hongling Zeng
2026-05-18  7:26   ` sashiko-bot
     [not found]   ` <6A0AC942.40201@126.com>
2026-05-18  8:52     ` Hongling Zeng
2026-05-18  6:29 ` [PATCH v5 4/4] phy: ti-pipe3: Fix clock leak in init error path Hongling Zeng
2026-05-18  7:48   ` sashiko-bot
2026-05-18  8:44   ` Hongling Zeng [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=6A0AD168.4040500@126.com \
    --to=zhongling0719@126.com \
    --cc=johan@kernel.org \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rogerq@ti.com \
    --cc=sashiko@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=zenghongling@kylinos.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox