summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarini T <harini.t@amd.com>2025-09-29 13:07:20 +0530
committerJassi Brar <jassisinghbrar@gmail.com>2025-10-06 18:14:00 -0500
commit341867f730d3d3bb54491ee64e8b1a0c446656e7 (patch)
treeff2b093599f83dd9b5b81114c2728c9354342d81
parent60d7416d8eb46ef2e71bf3dc13cd0c5eefc2ef89 (diff)
mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() call
The controller is registered using the device-managed function 'devm_mbox_controller_register()'. As documented in mailbox.c, this ensures the devres framework automatically calls mbox_controller_unregister() when device_unregister() is invoked, making the explicit call unnecessary. Remove redundant mbox_controller_unregister() call as device_unregister() handles controller cleanup. Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Harini T <harini.t@amd.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
-rw-r--r--drivers/mailbox/zynqmp-ipi-mailbox.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
index 0c143beaafda..263a3413a8c7 100644
--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
@@ -894,7 +894,6 @@ static void zynqmp_ipi_free_mboxes(struct zynqmp_ipi_pdata *pdata)
for (; i >= 0; i--) {
ipi_mbox = &pdata->ipi_mboxes[i];
if (ipi_mbox->dev.parent) {
- mbox_controller_unregister(&ipi_mbox->mbox);
if (device_is_registered(&ipi_mbox->dev))
device_unregister(&ipi_mbox->dev);
}