[PATCH] remoteproc: da8xx: handle reserved-memory cleanup registration failure
From: Jiawen Liu
Date: Sun Nov 29 2026 - 09:09:41 EST
After attaching a device-specific reserved-memory region, the driver
registers a devres action to release it. If registering that action
fails, the reset helper releases the region immediately, but the ignored
error lets probe continue without the configured DMA pool.
Propagate the registration failure before internal-memory setup or remote
processor registration. A subsequent firmware carveout allocation can
otherwise use the wrong DMA area or fail.
Fixes: 16689f33e5ad ("remoteproc: da8xx: Use devm action to release reserved memory")
Signed-off-by: Jiawen Liu <1298662399@xxxxxx>
---
drivers/remoteproc/da8xx_remoteproc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c
index e57dcb5598dfa..38b3801449d56 100644
--- a/drivers/remoteproc/da8xx_remoteproc.c
+++ b/drivers/remoteproc/da8xx_remoteproc.c
@@ -269,7 +269,10 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
ret = of_reserved_mem_device_init(dev);
if (ret)
return dev_err_probe(dev, ret, "device does not have specific CMA pool\n");
- devm_add_action_or_reset(&pdev->dev, da8xx_rproc_mem_release, &pdev->dev);
+ ret = devm_add_action_or_reset(&pdev->dev,
+ da8xx_rproc_mem_release, &pdev->dev);
+ if (ret)
+ return ret;
}
ret = da8xx_rproc_get_internal_memories(pdev, drproc);
--
2.34.1