[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a0662187e806af01f4faf3f0875c5ed4.sboyd@kernel.org>
Date: Wed, 09 Oct 2024 15:31:31 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Abel Vesa <abel.vesa@...aro.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Javier Carrasco <javier.carrasco.cruz@...il.com>, Neil Armstrong <neil.armstrong@...aro.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org, Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: Re: [PATCH] spmi: pmic-arb: fix return path in for_each_available_child_of_node()
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@...r.kernel.org
> Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@...il.com>
> ---
Applied to spmi-next
Powered by blists - more mailing lists