In the rproc_attach() function, if rproc_handle_resources() returns failure, if the rproc->ops->unprepare callback function is not set, the resources allocated by rproc_prepare_device() cannot be released, and rproc->clean_table should also be released
patch1 adds rproc->ops->unprepare callback function to imx_rproc patch2 releases rproc->clean_table Changes in v2: Updated the commit log of these two patches Link to v1: https://patchwork.kernel.org/project/linux-remoteproc/patch/20250424122252.2777363-1-xiaolei.w...@windriver.com/ https://patchwork.kernel.org/project/linux-remoteproc/patch/20250424122252.2777363-2-xiaolei.w...@windriver.com/ Xiaolei Wang (2): remoteproc: imx_rproc: release carveout under imx_rproc after rproc_attach() fails remoteproc: core: release rproc->clean_table after rproc_attach() fails drivers/remoteproc/imx_rproc.c | 14 ++++++++++++++ drivers/remoteproc/remoteproc_core.c | 1 + 2 files changed, 15 insertions(+) -- 2.25.1