[PATCH 1/3] mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() call

Peng Fan peng.fan at oss.nxp.com
Wed Sep 17 08:19:15 PDT 2025


On Fri, Aug 22, 2025 at 10:27:30AM +0530, Harini T wrote:
>Remove redundant mbox_controller_unregister() call as
>device_unregister() handles controller cleanup.
>

Should Fixes tag be added here?

Not sure whether device_unregister to trigger devres managed
mbox_controller_unregister would have any issue.

>Signed-off-by: Harini T <harini.t at amd.com>
>---
> drivers/mailbox/zynqmp-ipi-mailbox.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
>diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
>index 0c143beaafda..bdcc6937ee30 100644
>--- a/drivers/mailbox/zynqmp-ipi-mailbox.c
>+++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
>@@ -893,11 +893,8 @@ static void zynqmp_ipi_free_mboxes(struct zynqmp_ipi_pdata *pdata)
> 	i = pdata->num_mboxes;
> 	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);
>-		}
>+		if (device_is_registered(&ipi_mbox->dev))
>+			device_unregister(&ipi_mbox->dev);

The commit does not explain removing the check of ipi_mbox->dev.parent.
But I think this change is valid.

Regards
Peng

> 	}
> }
> 
>-- 
>2.43.0
>



More information about the linux-arm-kernel mailing list