]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup
authorPeng Fan <peng.fan@nxp.com>
Fri, 26 Sep 2025 12:33:17 +0000 (20:33 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 14 Oct 2025 15:11:39 +0000 (09:11 -0600)
commitb0106defc0ff673d6a29cbc858ea48b5f43ac7e7
tree9ca8426a26c4643053ddec507a0e7039f588448f
parent6c5c37dc41633f3a42dd9e9d80f6e673cdd91165
remoteproc: imx_rproc: Use devm_add_action_or_reset() for mailbox cleanup

Convert imx_rproc_free_mbox() to a devm-managed cleanup action using
devm_add_action_or_reset(). Ensure the mailbox resources are freed
automatically with the device lifecycle, simplify error handling and
removing the need for manual cleanup in probe and remove paths.

Also improve error reporting by using dev_err_probe() for consistency and
clarity.

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-3-4c0ec279cc5f@nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/imx_rproc.c