clk: fixed-rate: fix of_node_get-put imbalance
authorAlan Tull <atull@kernel.org>
Thu, 18 Oct 2018 19:54:11 +0000 (14:54 -0500)
committerStephen Boyd <sboyd@kernel.org>
Thu, 18 Oct 2018 20:40:15 +0000 (13:40 -0700)
When the fixed rate clock is created by devicetree,
of_clk_add_provider is called.  Add a call to
of_clk_del_provider in the remove function to balance
it out.

Signed-off-by: Alan Tull <atull@kernel.org>
Fixes: 435779fe1336 ("clk: fixed-rate: Convert into a module platform driver")
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-fixed-rate.c

index b5c46b3f8764d491da0f8586de8b18eb6d6f4527..6d6475c32ee51612df97f7fcce8c952a004ccdeb 100644 (file)
@@ -200,6 +200,7 @@ static int of_fixed_clk_remove(struct platform_device *pdev)
 {
        struct clk *clk = platform_get_drvdata(pdev);
 
+       of_clk_del_provider(pdev->dev.of_node);
        clk_unregister_fixed_rate(clk);
 
        return 0;