diff options
author | 2024-11-08 16:28:26 -0800 | |
---|---|---|
committer | 2024-11-10 10:56:46 +0100 | |
commit | 77adf4b1f3e1fdb319f7ee515e5924bb77df3916 (patch) | |
tree | ee3ce3e326a870872dc965bdc790e64bed26e90b /scripts/lib/kdoc/kdoc_parser.py | |
parent | Merge tag 'iio-for-6.13b' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next (diff) | |
download | wireguard-linux-77adf4b1f3e1fdb319f7ee515e5924bb77df3916.tar.xz wireguard-linux-77adf4b1f3e1fdb319f7ee515e5924bb77df3916.zip |
spmi: pmic-arb: fix return path in for_each_available_child_of_node()
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>
Link: https://lore.kernel.org/r/20241001-spmi-pmic-arb-scoped-v1-1-5872bab34ed6@gmail.com
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20241109002829.160973-2-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions