diff options
Diffstat (limited to 'drivers/clk/clk-fixed-factor.c')
| -rw-r--r-- | drivers/clk/clk-fixed-factor.c | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index 4f7bf3929d6d..4e4b6d367612 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -66,7 +66,14 @@ EXPORT_SYMBOL_GPL(clk_fixed_factor_ops);  static void devm_clk_hw_register_fixed_factor_release(struct device *dev, void *res)  { -	clk_hw_unregister_fixed_factor(&((struct clk_fixed_factor *)res)->hw); +	struct clk_fixed_factor *fix = res; + +	/* +	 * We can not use clk_hw_unregister_fixed_factor, since it will kfree() +	 * the hw, resulting in double free. Just unregister the hw and let +	 * devres code kfree() it. +	 */ +	clk_hw_unregister(&fix->hw);  }  static struct clk_hw * | 
