From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abel.vesa@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Javier Carrasco <javier.carrasco.cruz@gmail.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>
Subject: Re: [PATCH] spmi: pmic-arb: fix return path in for_each_available_child_of_node()
Date: Wed, 09 Oct 2024 15:31:31 -0700 [thread overview]
Message-ID: <a0662187e806af01f4faf3f0875c5ed4.sboyd@kernel.org> (raw)
In-Reply-To: <20241001-spmi-pmic-arb-scoped-v1-1-5872bab34ed6@gmail.com>
Quoting Javier Carrasco (2024-10-01 05:55:52)
> This loop requires explicit calls to of_node_put() upon early exits
> (break, goto, return) to decrement the child refcounter and avoid memory
> leaks if the child is not required out of the loop.
>
> A more robust solution is using the scoped variant of the macro, which
> automatically calls of_node_put() when the child goes out of scope.
>
> Cc: stable@vger.kernel.org
> Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
Applied to spmi-next
prev parent reply other threads:[~2024-10-09 22:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 12:55 [PATCH] spmi: pmic-arb: fix return path in for_each_available_child_of_node() Javier Carrasco
2024-10-01 13:16 ` Neil Armstrong
2024-10-09 22:31 ` Stephen Boyd [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=a0662187e806af01f4faf3f0875c5ed4.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=abel.vesa@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=javier.carrasco.cruz@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=stable@vger.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