summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoxiang Li <lihaoxiang@isrc.iscas.ac.cn>2025-12-10 06:16:56 +0300
committerSudeep Holla <sudeep.holla@arm.com>2025-12-15 13:31:15 +0300
commit9fda364cb78c8b9e1abe4029f877300c94655742 (patch)
tree54f391feaee4ee6bfca198964521156770a93aa6
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
downloadlinux-9fda364cb78c8b9e1abe4029f877300c94655742.tar.xz
firmware: arm_ffa: Unmap Rx/Tx buffers on init failure
ffa_init() maps the Rx/Tx buffers via ffa_rxtx_map() but on the partition setup failure path it never unmaps them. Add the missing ffa_rxtx_unmap() call in the error path so that the Rx/Tx buffers are properly released before freeing the backing pages. Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> Message-Id: <20251210031656.56194-1-lihaoxiang@isrc.iscas.ac.cn> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r--drivers/firmware/arm_ffa/driver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index c72ee4756585..7209a630f6d1 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -2068,6 +2068,7 @@ static int __init ffa_init(void)
pr_err("failed to setup partitions\n");
ffa_notifications_cleanup();
+ ffa_rxtx_unmap(drv_info->vm_id);
free_pages:
if (drv_info->tx_buffer)
free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);