linux/drivers/clk/imx
Yuxing Liu 6317d03026 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-19 16:21:29 +02:00
..
clk-busy.c
clk-composite-7ulp.c
clk-composite-8m.c
clk-composite-93.c clk: imx: clk-composite-93: check white_list 2022-09-19 13:06:45 +03:00
clk-cpu.c
clk-divider-gate.c
clk-fixup-div.c
clk-fixup-mux.c
clk-frac-pll.c
clk-fracn-gppll.c clk: imx: fracn-gppll: disable hardware select control 2023-05-11 23:03:34 +09:00
clk-gate-93.c clk: imx: add i.MX93 clk gate 2022-09-19 13:06:45 +03:00
clk-gate-exclusive.c
clk-gate2.c
clk-imx1.c
clk-imx5.c
clk-imx6q.c
clk-imx6sl.c
clk-imx6sll.c
clk-imx6sx.c clk: imx: imx6sx: remove the SET_RATE_PARENT flag for QSPI clocks 2022-09-28 13:26:16 -07:00
clk-imx6ul.c
clk-imx7d.c
clk-imx7ulp.c
clk-imx8dxl-rsrc.c
clk-imx8mm.c
clk-imx8mn.c clk: imx: clk-imx8mn: fix memory leak in imx8mn_clocks_probe 2023-07-19 16:21:29 +02:00
clk-imx8mp.c clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe() 2023-07-19 16:21:29 +02:00
clk-imx8mq.c
clk-imx8qm-rsrc.c
clk-imx8qxp-lpcg.c
clk-imx8qxp-lpcg.h
clk-imx8qxp-rsrc.c
clk-imx8qxp.c
clk-imx8ulp.c clk: imx: imx8ulp: Fix XBAR_DIVBUS and AD_SLOW clock parents 2023-05-11 23:03:34 +09:00
clk-imx25.c
clk-imx27.c
clk-imx31.c
clk-imx35.c
clk-imx93.c clk: imx93: fix memory leak and missing unwind goto in imx93_clocks_probe 2023-07-19 16:21:29 +02:00
clk-imxrt1050.c clk: imx: clk-imxrt1050: fix memory leak in imxrt1050_clocks_probe 2023-07-19 16:21:29 +02:00
clk-lpcg-scu.c
clk-pfd.c
clk-pfdv2.c
clk-pll14xx.c
clk-pllv1.c
clk-pllv2.c
clk-pllv3.c
clk-pllv4.c
clk-scu.c clk: imx: scu: use _safe list iterator to avoid a use after free 2023-07-19 16:21:19 +02:00
clk-scu.h
clk-sscg-pll.c
clk-vf610.c
clk.c
clk.h clk: imx: add i.MX93 clk gate 2022-09-19 13:06:45 +03:00
Kconfig
Makefile clk: imx: add i.MX93 clk gate 2022-09-19 13:06:45 +03:00