From: Sebastian Andrzej Siewior Date: Wed, 17 Jun 2026 06:55:29 +0000 (+0200) Subject: mailbox: imx: use devm_of_platform_populate() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dd1b321e8024fb01404fe163076c9010c5df8608;p=thirdparty%2Fkernel%2Flinux.git mailbox: imx: use devm_of_platform_populate() 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 Reviewed-by: Mathieu Poirier Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Jassi Brar --- diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 516a05b64daa..a8d4e970fb78 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;