[PATCH] mailbox: zynqmp: Put the parent node after reading buffer resources
From: Zhu Jun
Date: Thu Nov 12 2026 - 02:30:16 EST
versal_ipi_setup() obtains a reference to the parent node to look up
the host message buffer resource, but never releases it. Each setup
leaks the reference, including when a subsequent buffer mapping fails.
The resource lookup copies the address and size into host_res. Drop
the node reference immediately after that lookup.
Fixes: 0ac39d85a741 ("mailbox: zynqmp: Enable Bufferless IPI usage on Versal-based SOC's")
Signed-off-by: Zhu Jun <zhujun2@xxxxxxxxxxxxxxxxxxxx>
---
drivers/mailbox/zynqmp-ipi-mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index 2b81bedf0653..0c175f0b048a 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -696,6 +696,7 @@ static int versal_ipi_setup(struct zynqmp_ipi_mbox *ipi_mbox,
mdev = &ipi_mbox->dev;
host_idx = zynqmp_ipi_mbox_get_buf_res(parent_node, "msg", &host_res);
+ of_node_put(parent_node);
remote_idx = zynqmp_ipi_mbox_get_buf_res(node, "msg", &remote_res);
/*
--
2.51.0