]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup
authorPeng Fan <peng.fan@nxp.com>
Fri, 26 Sep 2025 12:33:18 +0000 (20:33 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 14 Oct 2025 15:12:29 +0000 (09:12 -0600)
commit65af722aa86fc58431670b3d95be9e1d9a0b060f
tree95b244ee3fd456e022ce9422d7bef2fe837392e9
parentb0106defc0ff673d6a29cbc858ea48b5f43ac7e7
remoteproc: imx_rproc: Use devm_clk_get_enabled() and simplify cleanup

Replace separate calls to devm_clk_get() and clk_prepare_enable() with
devm_clk_get_enabled(), which combines clock acquisition and enabling
into a single managed step. Simplify the probe logic and remove the need
for manual clock disable in error and remove paths.

Also, update error handling to eliminate redundant cleanup steps and use
return-based error propagation where appropriate. Improve code clarity and
reduce the chance of resource leaks or incorrect ordering in cleanup paths.

No functional changes.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250926-imx_rproc_v3-v3-4-4c0ec279cc5f@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/imx_rproc.c