]> git.baikalelectronics.ru Git - kernel.git/commit
clk: bm1880: remove kfrees on static allocations
authorConor Dooley <conor.dooley@microchip.com>
Thu, 23 Dec 2021 15:42:44 +0000 (15:42 +0000)
committerStephen Boyd <sboyd@kernel.org>
Fri, 7 Jan 2022 01:46:56 +0000 (17:46 -0800)
commitd5dcdb02de0852b83c3e6a8d86a07e07c787d9fe
treeb112480166aaf7579cb009427e0c42f0c5ff5869
parentbad68f6c0c96b209be688acd1511fc590315093b
clk: bm1880: remove kfrees on static allocations

bm1880_clk_unregister_pll & bm1880_clk_unregister_div both try to
free statically allocated variables, so remove those kfrees.

For example, if we take L703 kfree(div_hw):
- div_hw is a bm1880_div_hw_clock pointer
- in bm1880_clk_register_plls this is pointed to an element of arg1:
  struct bm1880_div_hw_clock *clks
- in the probe, where bm1880_clk_register_plls is called arg1 is
  bm1880_div_clks, defined on L371:
  static struct bm1880_div_hw_clock bm1880_div_clks[]

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Fixes: 82abc377e2d9 ("clk: Add common clock driver for BM1880 SoC")
Link: https://lore.kernel.org/r/20211223154244.1024062-1-conor.dooley@microchip.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-bm1880.c