Skip to contentSkip to conversation

clk: ti: adpll: unregister OF clock provider on remove

PATCH Applied Myeonghun Pak 2 participants 3 messages Jun 26 – Sep 29

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: ti: adpll: unregister OF clock provider on remove

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")
---
 drivers/clk/ti/adpll.c | 1 +
 1 file changed, 1 insertion(+)
drivers/clk/ti/adpll.c +1 -0
index e305fcb..0c22e33 100644
@@ -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);
 }
 
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Myeonghun Pak

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.

Quoted 8 lines

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")
Applied
#2 lore raw
In reply to Myeonghun Pak
Quoted 1 line · Myeonghun Pak

clk: ti: adpll: unregister OF clock provider on remove

Applied, thanks!

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

      commit: 4c943ddfc24340f1b899762b1ff35c38306b7a35

Best regards,

Signature · 1 line
Brian Masney <[email protected]>