From: Lee Jones <lee@kernel.org>
To: Zhang Zekun <zhangzekun11@huawei.com>
Cc: pavel@ucw.cz, matthias.bgg@gmail.com, linux-leds@vger.kernel.org,
chenjun102@huawei.com
Subject: Re: [PATCH] leds: mt6360: Fix error path in device_for_each_child_node()
Date: Thu, 31 Oct 2024 16:22:54 +0000 [thread overview]
Message-ID: <20241031162254.GM10824@google.com> (raw)
In-Reply-To: <20241023120628.15944-1-zhangzekun11@huawei.com>
On Wed, 23 Oct 2024, Zhang Zekun wrote:
> When break out from device_for_each_child_node(), the child node
> is refcount added, and requires calls to fwnode_handle_put().
> Use scoped fwnode_handle_put() to put child node automatically in
> error path.
>
> Fixes: 679f8652064b ("leds: Add mt6360 driver")
> Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
> ---
> drivers/leds/flash/leds-mt6360.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
You were beaten to it I'm afraid:
https://lore.kernel.org/r/20240927-leds_device_for_each_child_node_scoped-v1-1-95c0614b38c8@gmail.com
--
Lee Jones [李琼斯]
prev parent reply other threads:[~2024-10-31 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 12:06 [PATCH] leds: mt6360: Fix error path in device_for_each_child_node() Zhang Zekun
2024-10-23 15:51 ` Matthias Brugger
2024-10-31 16:22 ` Lee Jones [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=20241031162254.GM10824@google.com \
--to=lee@kernel.org \
--cc=chenjun102@huawei.com \
--cc=linux-leds@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=pavel@ucw.cz \
--cc=zhangzekun11@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.