The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: imx@lists.linux.dev, linux-rt-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v3 04/10] mailbox: imx: use devm_of_platform_populate()
Date: Wed, 17 Jun 2026 07:04:47 +0000	[thread overview]
Message-ID: <20260617070447.E34C31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260617-imx_mbox_rproc-v3-4-77948112defc@linutronix.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The return value of devm_of_platform_populate() is ignored, leading to silent probe success even if child devices fail to populate, and breaking the intended cleanup on module removal.
--

commit 583b7f6c5d004040c54817c853b20be8858487ce
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

mailbox: imx: use devm_of_platform_populate()

This commit transitions the driver to use the managed function
devm_of_platform_populate(). This is intended to ensure that populated
child devices are properly removed when the parent device is removed,
fixing an issue where module reloads could lead to "double devices".

> diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> --- 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);

[Severity: High]
Should this code check the return value of devm_of_platform_populate()?

If the function fails and returns an error code, the devres cleanup action
is not registered, but imx_mu_probe() will still return 0. This could
lead to a situation where child devices silently fail to populate, and any
partially populated devices would not be cleaned up on module removal.

For example:

	ret = devm_of_platform_populate(dev);
	if (ret)
		goto err_out;

>  
>  	return 0;
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260617-imx_mbox_rproc-v3-0-77948112defc@linutronix.de?part=4

       reply	other threads:[~2026-06-17  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260617-imx_mbox_rproc-v3-0-77948112defc@linutronix.de>
     [not found] ` <20260617-imx_mbox_rproc-v3-4-77948112defc@linutronix.de>
2026-06-17  7:04   ` sashiko-bot [this message]
     [not found] ` <20260617-imx_mbox_rproc-v3-2-77948112defc@linutronix.de>
2026-06-17  7:08   ` [PATCH v3 02/10] mailbox: imx: Add a channel shutdown field sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-1-77948112defc@linutronix.de>
2026-06-17  7:08   ` [PATCH v3 01/10] mailbox: imx: Forward the timeout/ error in imx_mu_generic_tx() sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-6-77948112defc@linutronix.de>
2026-06-17  7:08   ` [PATCH v3 06/10] mailbox: imx: Start splitting the IRQ handler in primary and threaded handler sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-9-77948112defc@linutronix.de>
2026-06-17  7:08   ` [PATCH v3 09/10] mailbox: imx: Don't force-thread the primary handler sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-3-77948112defc@linutronix.de>
2026-06-17  7:08   ` [PATCH v3 03/10] mailbox: imx: Use devm_pm_runtime_enable() sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-5-77948112defc@linutronix.de>
2026-06-17  7:13   ` [PATCH v3 05/10] mailbox: imx: Use channel index instead of zero in imx_mu_specific_rx() sashiko-bot
     [not found] ` <20260617-imx_mbox_rproc-v3-10-77948112defc@linutronix.de>
2026-06-17  7:19   ` [PATCH v3 10/10] remoteproc: imx_rproc: Invoke the callback directly sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260617070447.E34C31F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox