WSL2-Linux-Kernel/drivers/clk/imx
Yuxing Liu bcea444ab4 clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()
[ Upstream commit 878b02d5f3 ]

Replace of_iomap() and kzalloc() with devm_of_iomap() and devm_kzalloc()
which can automatically release the related memory when the device
or driver is removed or unloaded to avoid potential memory leak.

In this case, iounmap(anatop_base) in line 427,433 are removed
as manual release is not required.

Besides, referring to clk-imx8mq.c, check the return code of
of_clk_add_hw_provider, if it returns negtive, print error info
and unregister hws, which makes the program more robust.

Fixes: 9c140d9926 ("clk: imx: Add support for i.MX8MP clock driver")
Signed-off-by: Yuxing Liu <lyx2022@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20230503070607.2462-1-lyx2022@hust.edu.cn
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:47:07 +02:00
..
Kconfig clk: imx: fix Kconfig warning for i.MX SCU clk 2021-01-12 11:25:54 -08:00
Makefile clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03:00
clk-busy.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-composite-7ulp.c clk: fractional-divider: Hide clk_fractional_divider_ops from wide audience 2021-08-12 12:42:00 -07:00
clk-composite-8m.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-cpu.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-divider-gate.c clk: imx: clk-divider-gate: Switch to clk_divider.determine_rate 2021-08-24 16:09:07 +03:00
clk-fixup-div.c clk: imx: drop redundant initialization 2020-02-17 14:32:32 +08:00
clk-fixup-mux.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-frac-pll.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-gate-exclusive.c
clk-gate2.c clk: imx: gate2: Remove unused variable ret 2020-11-10 09:08:03 +08:00
clk-imx1.c
clk-imx5.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6q.c clk: imx6q: fix uart earlycon unwork 2021-08-05 18:12:23 -07:00
clk-imx6sl.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6sll.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx6sx.c clk: imx: imx6sx: remove the SET_RATE_PARENT flag for QSPI clocks 2022-10-05 10:39:44 +02:00
clk-imx6ul.c clk: imx: imx6ul: Move csi_sel mux to correct base register 2021-11-25 09:48:26 +01:00
clk-imx7d.c clk: imx7d: Remove audio_mclk_root_clk 2022-04-08 14:23:47 +02:00
clk-imx7ulp.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx8mm.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-imx8mn.c clk: imx: clk-imx8mn: fix memory leak in imx8mn_clocks_probe 2023-07-23 13:47:07 +02:00
clk-imx8mp.c clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe() 2023-07-23 13:47:07 +02:00
clk-imx8mq.c clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00
clk-imx8qm-rsrc.c clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03:00
clk-imx8qxp-lpcg.c clk: imx: off by one in imx_lpcg_parse_clks_from_dt() 2022-04-08 14:23:47 +02:00
clk-imx8qxp-lpcg.h
clk-imx8qxp-rsrc.c clk: imx8qxp: add clock valid checking mechnism 2021-06-14 12:33:19 +03:00
clk-imx8qxp.c clk: imx: use module_platform_driver 2021-12-14 10:57:17 +01:00
clk-imx25.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx27.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-imx31.c clk: imx: clk-imx31: Remove unused static const table 'uart_clks' 2021-01-29 21:31:52 +08:00
clk-imx35.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk-lpcg-scu.c clk: imx: Reference preceded by free 2021-04-04 22:39:05 +03:00
clk-pfd.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pfdv2.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pll14xx.c clk: imx: remove unneeded semicolon 2020-11-01 17:19:18 +08:00
clk-pllv1.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-pllv2.c clk: imx: pllv2: Switch to clk_hw based API 2019-12-11 19:19:44 +08:00
clk-pllv3.c clk: imx: Fix and update kerneldoc 2020-09-07 11:08:50 +08:00
clk-pllv4.c clk: imx: Explicitly include bits.h 2020-08-22 20:36:57 +08:00
clk-scu.c clk: imx: scu: use _safe list iterator to avoid a use after free 2023-07-23 13:47:00 +02:00
clk-scu.h clk: imx8qm: add clock valid resource checking 2021-06-14 12:33:22 +03:00
clk-sscg-pll.c clk: imx: Support building i.MX common clock driver as module 2020-08-22 12:38:20 +08:00
clk-vf610.c clk: imx: vf610: Add CRC clock 2020-08-23 10:08:35 +08:00
clk.c clk: imx: Fix reparenting of UARTs not associated with stdout 2021-04-04 22:39:04 +03:00
clk.h clk: imx8m: fix clock tree update of TF-A managed clocks 2021-08-24 16:09:07 +03:00