From: Markus Elfring <Markus.Elfring@web.de>
To: "Nguyễn Công" <congnt264@gmail.com>,
linux-leds@vger.kernel.org, "Lee Jones" <lee@kernel.org>,
"Pavel Machek" <pavel@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Luca Weiss <luca@lucaweiss.eu>
Subject: Re: [PATCH v2] leds: sgm3140: Put the child node reference on success
Date: Thu, 26 Nov 2026 14:46:56 +0100 [thread overview]
Message-ID: <f92d05d9-2452-4187-bcf2-872eb285077f@web.de> (raw)
In-Reply-To: <20261126122516.1198461-1-congnt264@gmail.com>
…
> +++ b/drivers/leds/flash/leds-sgm3140.c
…
> @@ -270,12 +270,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;
Is such a jump to an immediately following statement redundant?
> }
>
> - return ret;
> -
> -err:
> +out_put_node:
> fwnode_handle_put(child_node);
> return ret;
> }
Under which circumstances would you become interested to apply the attribute “__free(fwnode_handle)”?
https://elixir.bootlin.com/linux/v7.4-rc1/source/include/linux/property.h#L229
Regards,
Markus
prev parent reply other threads:[~2026-11-26 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 12:25 Cong Nguyen
2026-11-26 13:46 ` Markus Elfring [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=f92d05d9-2452-4187-bcf2-872eb285077f@web.de \
--to=markus.elfring@web.de \
--cc=congnt264@gmail.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=luca@lucaweiss.eu \
--cc=pavel@kernel.org \
/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
all inboxes | Powered by JetHome®