All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: mediatek: hdmi: Fix potential stale PLL provider on unbind
@ 2026-11-26 12:00 ` Tian Xuechen
  0 siblings, 0 replies; 4+ messages in thread
From: Tian Xuechen @ 2026-11-26 12:00 UTC (permalink / raw)
  To: chunkuang.hu, p.zabel, chunfeng.yun, vkoul, matthias.bgg,
	angelogioacchino.delregno, jie.qiu, junzhi.zhao
  Cc: neil.armstrong, mani, dri-devel, linux-mediatek, linux-arm-kernel,
	linux-phy, linux-kernel, liguangshuo

From: Guangshuo Li <liguangshuo@mail.sdu.edu.cn>

The HDMI PHY registers its PLL with devres but leaves the OF clock
provider registered on unbind. Publish the PLL hardware through a
managed provider so it is withdrawn before the PLL is unregistered.

This issue was found by our static analysis tool under development.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn>
---
 drivers/phy/mediatek/phy-mtk-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c
index d063fc787c28..06784393b0ef 100644
--- a/drivers/phy/mediatek/phy-mtk-hdmi.c
+++ b/drivers/phy/mediatek/phy-mtk-hdmi.c
@@ -178,8 +178,8 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
 			return ret;
 	}
 
-	return of_clk_add_provider(dev->of_node, of_clk_src_simple_get,
-				   hdmi_phy->pll);
+	return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
+					   &hdmi_phy->pll_hw);
 }
 
 static const struct of_device_id mtk_hdmi_phy_match[] = {

base-commit: 4dce97c6c265544342e716e62fd24bbb232590c5
-- 
2.43.0



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

end of thread, other threads:[~2026-11-26 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 12:00 [PATCH] phy: mediatek: hdmi: Fix potential stale PLL provider on unbind Tian Xuechen
2026-11-26 12:00 ` Tian Xuechen
2026-11-26 12:09 ` sashiko-bot
2026-11-26 12:09   ` sashiko-bot

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.