clk: fixed-factor: fix of_node_get-put imbalance
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thu, 1 Nov 2018 13:15:49 +0000 (14:15 +0100)
committerStephen Boyd <sboyd@kernel.org>
Tue, 6 Nov 2018 16:27:52 +0000 (08:27 -0800)
When the fixed factor 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.

Reported-by: Alan Tull <atull@kernel.org>
Fixes: 971451b3b15d ("clk: fixed-factor: Convert into a module platform driver")
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-fixed-factor.c

index ef0ca9414f371bc3275b7afce529029e10b49f68..ff83e899df71fca602aadba443fdce73308eb9c5 100644 (file)
@@ -210,6 +210,7 @@ static int of_fixed_factor_clk_remove(struct platform_device *pdev)
 {
        struct clk *clk = platform_get_drvdata(pdev);
 
+       of_clk_del_provider(pdev->dev.of_node);
        clk_unregister_fixed_factor(clk);
 
        return 0;