Skip to content

Commit 09527e2

Browse files
author
Sudeep Holla
committed
firmware: arm_ffa: Skip free_pages on RX buffer alloc failure
If the RX buffer allocation fails in ffa_init(), the error path jumps to free_pages even though no buffer has been allocated yet. Route that case directly to free_drv_info so the cleanup path is only used after at least one RX/TX buffer allocation has succeeded. Fixes: 3bbfe98 ("firmware: arm_ffa: Add initial Arm FFA driver support") Link: https://patch.msgid.link/20260428-ffa_fixes-v2-2-8595ae450034@kernel.org Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
1 parent 0a5e695 commit 09527e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/firmware/arm_ffa/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ static int __init ffa_init(void)
20672067
drv_info->rx_buffer = alloc_pages_exact(rxtx_bufsz, GFP_KERNEL);
20682068
if (!drv_info->rx_buffer) {
20692069
ret = -ENOMEM;
2070-
goto free_pages;
2070+
goto free_drv_info;
20712071
}
20722072

20732073
drv_info->tx_buffer = alloc_pages_exact(rxtx_bufsz, GFP_KERNEL);

0 commit comments

Comments
 (0)