[PATCH] clk: ti: adpll: unregister OF clock provider on remove

From: Myeonghun Pak

Date: Fri Jun 26 2026 - 05:43:27 EST


ti_adpll_probe() registers the driver's onecell clock provider with
of_clk_add_provider(). The remove path only frees the clock resources,
leaving the provider registered after the backing data has been torn
down.

Unregister the OF clock provider before freeing the ADPLL resources so
the provider no longer points at released driver data after device
removal.

Fixes: 21330497f303 ("clk: ti: Add support for dm814x ADPLL")
Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
---
drivers/clk/ti/adpll.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/ti/adpll.c b/drivers/clk/ti/adpll.c
index e305fcb..0c22e33 100644
--- a/drivers/clk/ti/adpll.c
+++ b/drivers/clk/ti/adpll.c
@@ -925,6 +925,7 @@ static void ti_adpll_remove(struct platform_device *pdev)
{
struct ti_adpll_data *d = dev_get_drvdata(&pdev->dev);

+ of_clk_del_provider(d->np);
ti_adpll_free_resources(d);
}

--
2.53.0