From: sashiko-bot@kernel.org
To: "Cong Nguyen" <congnt264@gmail.com>
Cc: linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH v2] leds: sgm3140: Put the child node reference on success
Date: Thu, 26 Nov 2026 12:30:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-235505@kernel.org> (raw)
In-Reply-To: <20261126122516.1198461-1-congnt264@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] leds: sgm3140: undefined label err in sgm3140_probe() breaking
build
--
commit a2a470e44324b53eed05e9b4ce69e063a370bf56
Author: Cong Nguyen <congnt264@gmail.com>
leds: sgm3140: Put the child node reference on success
This commit drops the child fwnode reference in sgm3140_probe() on the
success path as well as on error paths, and renames the exit label from
err to out_put_node.
> diff --git a/drivers/leds/flash/leds-sgm3140.c b/drivers/leds/flash/leds-sgm3140.c
> index b1fdf2b55b5fe..df06fa1a38edc 100644
> --- a/drivers/leds/flash/leds-sgm3140.c
> +++ b/drivers/leds/flash/leds-sgm3140.c
> @@ -264,7 +264,7 @@ static int sgm3140_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(&pdev->dev, "Failed to register flash device: %d\n",
> ret);
> - goto err;
> + goto out_put_node;
> }
>
> sgm3140_init_v4l2_flash_config(priv, &v4l2_sd_cfg);
> @@ -276,12 +276,10 @@ static int sgm3140_probe(struct platform_device *pdev)
> &v4l2_sd_cfg);
> if (IS_ERR(priv->v4l2_flash)) {
> ret = PTR_ERR(priv->v4l2_flash);
> - goto err;
> + goto out_put_node;
> }
>
> - return ret;
> -
> -err:
> +out_put_node:
> fwnode_handle_put(child_node);
> return ret;
> }
[Severity: High]
Does renaming the err label to out_put_node break the build when
CONFIG_LEDS_SGM3140 is enabled?
Earlier in sgm3140_probe(), the error check for
devm_delayed_work_autocancel() still jumps to err:
drivers/leds/flash/leds-sgm3140.c:sgm3140_probe() {
...
ret = devm_delayed_work_autocancel(&pdev->dev, &priv->powerdown_work,
sgm3140_powerdown_work);
if (ret)
goto err;
...
}
That goto also needs to be updated to out_put_node.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126122516.1198461-1-congnt264@gmail.com?part=1
prev parent reply other threads:[~2026-11-26 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 12:25 [PATCH v2] leds: sgm3140: Put the child node reference on success Cong Nguyen
2026-11-26 12:30 ` sashiko-bot [this message]
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=sashiko-outbox-235505@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=congnt264@gmail.com \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--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