[PATCH v3 04/10] mailbox: imx: use devm_of_platform_populate()
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Tue Jun 16 23:55:29 PDT 2026
The driver uses of_platform_populate() but does not remove the added
devices on removal. This can lead to "double devices" on module removal
followed by adding the module again.
Use devm_of_platform_populate() to remove the populated devices once the
parent device is removed.
Reviewed-by: Peng Fan <peng.fan at nxp.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier at linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
---
drivers/mailbox/imx-mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 516a05b64daa1..a8d4e970fb786 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -984,7 +984,7 @@ static int imx_mu_probe(struct platform_device *pdev)
if (ret)
goto err_out;
- of_platform_populate(dev->of_node, NULL, NULL, dev);
+ devm_of_platform_populate(dev);
return 0;
--
2.53.0
More information about the linux-arm-kernel
mailing list