clk: imx: imx8: Fix an error handling path in imx8_acm_clk_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 14 Sep 2023 20:31:04 +0000 (22:31 +0200)
committerAbel Vesa <abel.vesa@linaro.org>
Wed, 4 Oct 2023 08:13:59 +0000 (11:13 +0300)
commite9a164e367f039629fd5466a79b9f495646e1261
tree9d053e053af885046530ea8d4519b8728a0565d2
parent9a0108acdb1b6189dcc8f9318edfc6b7e0281df4
clk: imx: imx8: Fix an error handling path in imx8_acm_clk_probe()

If an error occurs after a successful clk_imx_acm_attach_pm_domains() call,
it must be undone.

Add an explicit error handling path, re-order the code and add the missing
clk_imx_acm_detach_pm_domains() call.

Fixes: d3a0946d7ac9 ("clk: imx: imx8: add audio clock mux driver")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
drivers/clk/imx/clk-imx8-acm.c