]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:02:22 +0000 (11:02 +0100)
commit8ca726dc2c1ceb11bf232219213bf851f0c50d15
treeffd2350c617ad3f4010f9ad5263b32092f5912e4
parent4dc890af7c17e5d42aaeba1ab44fb70c0b454606
clk: bm1880: remove kfrees on static allocations

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit c861c1be3897845313a0df47804b1db37c7052e1 ]

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: 1ab4601da55b ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/clk/clk-bm1880.c