Commit 341867f7 authored by Harini T's avatar Harini T Committed by Jassi Brar
Browse files

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: 4981b82b ("mailbox: ZynqMP IPI mailbox controller")
Signed-off-by: default avatarHarini T <harini.t@amd.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
parent 60d7416d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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);
		}