Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/4] phy: ti-pipe3: Fix clock resource handling issues
@ 2026-05-18  6:29 Hongling Zeng
  2026-05-18  6:29 ` [PATCH v5 1/4] phy: ti-pipe3: Fix ignored clock enable return value in init Hongling Zeng
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Hongling Zeng @ 2026-05-18  6:29 UTC (permalink / raw)
  To: vkoul, neil.armstrong, johan, kishon, rogerq
  Cc: linux-phy, linux-kernel, zhongling0719, Hongling Zeng

This patch series fixes multiple clock resource handling issues in the
ti-pipe3 PHY driver.

Patch 1 fixes a critical issue where ti_pipe3_init() was ignoring the
return value of ti_pipe3_enable_clocks(), which could lead to unclocked
hardware access and unbalanced clock disables.

Patch 2 fixes a clock resource leak when probe fails after enabling
the SATA refclk. The error path now properly disables the clock and
cleans up runtime PM resources.

Patch 3 fixes EPROBE_DEFER handling to prevent masking probe deferral
errors. It uses devm_clk_get_optional() for SATA refclk to properly
handle optional clocks while still propagating -EPROBE_DEFER and other
error codes.

Patch 4 fixes a clock leak in the init error path when regmap_update_bits()
fails in PCIe mode, adding proper clock cleanup consistent with other
error paths.

These fixes ensure proper resource cleanup on probe and init failures,
and prevent permanent driver initialization failures due to incorrect
error handling.

Changes in v5:
- Add patch to fix ignored clock enable return value in ti_pipe3_init()
- Improve error handling consistency across all paths

Changes in v4:
- Use devm_clk_get_optional() for SATA refclk
- Drop manual -ENOENT handling

Hongling Zeng (4):
  phy: ti-pipe3: Fix ignored clock enable return value in init
  phy: ti: pipe3: Fix clock resource leak on probe errors
  phy: ti-pipe3: Fix EPROBE_DEFER handling for clock resources
  phy: ti-pipe3: Fix clock leak in init error path

 drivers/phy/ti/phy-ti-pipe3.c | 58 ++++++++++++++++++++++++++++--------
 1 file changed, 46 insertions(+), 12 deletions(-)

--
2.25.1

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-05-18  8:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox