* [PATCH] remoteproc: da8xx: handle reserved-memory cleanup registration failure
@ 2026-11-29 12:46 Jiawen Liu
0 siblings, 0 replies; only message in thread
From: Jiawen Liu @ 2026-11-29 12:46 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier; +Cc: linux-kernel
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@qq.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-29 14:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 12:46 [PATCH] remoteproc: da8xx: handle reserved-memory cleanup registration failure Jiawen Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®