From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=162.62.57.210 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795961378; b=nKQ7DeUQ2V1MZuq6wk32AA05CnP9p6JkUiLUfl2Bm3EaKX1p4jjUQev2aLY8roFqXHe8 csu0wI192tv0iHs7ujRIE/P76JN9woIHHj2aRQcR2Rop7wdzepv5JpnpTLd8zYiLiAikE Y+/jLaxdK+bkjqtEcQEujrtoK2gYbNzOtU3KkvHGf0gZkm060jfx4lpSBGYk2lF7DyrDW P0K2qUJNNdH24ldg8PofXOmoYyLiEYnGXHZt0tu4zYSiWYdLWRw9PPhqRyEJIsfk2Hpro TlSzLV/pr5OR2yAydKSx12rRayvlkL2XBDPJ1HIMaE6VHkU/4L3dc13yH5jZrlJAxXQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795961378; h=DMARC-Filter:DKIM-Signature:Received:X-QQ-mid:Message-ID: X-QQ-XMAILINFO:X-QQ-XMRINFO:From:Date:Subject:To:Cc:MIME-Version: Content-Type:Content-Transfer-Encoding:X-OQ-MSGID; bh=bdck6laWuRDXBSP+ylzYRQ49wWr9S4u6M7COpymCJf4=; b=nAyiQ51Q7YKwKrYv/PrZrNr5chNCnbiNFAT4PjSKYioSUQGAQ+HQhh/SBjiISZFEFlKH 2GbPJwD+FQgCbAupq4Y4VxYWUEDTPdCdaXfhUA5gwKmPQyfpJ1vsuxGBjm3iy1gWwdItS t8XLTXMjfuZOkyyN/f7csHRVrJ5JE7bA9BZ+p5jc7u3PUGTKXCRjSidEDRnsmf70m4C4J AaNHfrJ4r80lRspVqzAJAHsfwm1JjyJmDwXczQ2rXGviHDNbvJmgF6W4xQJyLhUnKChBi gaW0yO2w9UilS9driDC37w/kUeAnk1xhV/xQ2aCoN26e64TZkmUVGJlZQKwfARtxXwg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=qq.com; spf=pass smtp.mailfrom=qq.com; dkim=pass header.d=qq.com header.i=@qq.com header.a=rsa-sha256 header.s=s201512 header.b=KksNzot1; arc=none smtp.remote-ip=162.62.57.210 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86616606A31C for ; Sun, 29 Nov 2026 14:09:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 86616606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=qq.com header.i=@qq.com header.a=rsa-sha256 header.s=s201512 header.b=KksNzot1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1795961372; bh=bdck6laWuRDXBSP+ylzYRQ49wWr9S4u6M7COpymCJf4=; h=From:Date:Subject:To:Cc; b=KksNzot1zGbBeWKUEPq/0I1i8hwfIo3/wdtia4MJ9G+fI8H9/viccJ2jcIAEzJDp6 L1QN1chHWxzFkKIv2gmGf8uMMrHG02YSM1boHujts4HKiJfV/zP3k91NBKPJ/ag6Tm FwBP4cLtGDQK9yGCmS+vh8IG5BIngOhjBQQp7txY= Received: from [127.0.1.1] ([5.195.0.150]) by newxmesmtplogicsvrsza53-0.qq.com (NewEsmtp) with SMTP id 25D96625; Sun, 29 Nov 2026 22:09:29 +0800 X-QQ-mid: xmsmtpt1795961369toyfd6jpk Message-ID: X-QQ-XMAILINFO: NGZp1yYNf7Y+Wh+dveNe1HZAxaUYT7CWzi9uykTR0y3eR7OZD6DhsLZvN1/JRt N1O2nq5KWC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vGXbT8u+ytkex4Mkn96NSsqW3CGLVlJCbz X-QQ-XMRINFO: M/715EihBoGS47X28/vv4NpnfpeBLnr4Qg== From: Jiawen Liu <1298662399@qq.com> Date: Sun, 29 Nov 2026 16:46:19 +0400 Subject: [PATCH] remoteproc: da8xx: handle reserved-memory cleanup registration failure To: Bjorn Andersson , Mathieu Poirier Cc: linux-kernel@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-OQ-MSGID: 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