diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-11-20 23:33:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 13:04:56 +0300 |
commit | 179ecdf5c08919c81a41ddfa20a00150c0f095cb (patch) | |
tree | ecb543253e56c3405d9daf28ad4f85161f50dc90 /arch/powerpc/platforms/cell | |
parent | 5203c7027fdd70967e3b7fb5c0e258891cb69388 (diff) | |
download | linux-179ecdf5c08919c81a41ddfa20a00150c0f095cb.tar.xz |
powerpc/powernv: add missing of_node_put
[ Upstream commit 7d405a939ca960162eb30c1475759cb2fdf38f8c ]
for_each_compatible_node performs an of_node_get on each iteration, so
a break out of the loop requires an of_node_put.
A simplified version of the semantic patch that fixes this problem is as
follows (http://coccinelle.lip6.fr):
// <smpl>
@@
local idexpression n;
expression e;
@@
for_each_compatible_node(n,...) {
...
(
of_node_put(n);
|
e = n
|
+ of_node_put(n);
? break;
)
...
}
... when != n
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1448051604-25256-4-git-send-email-Julia.Lawall@lip6.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/powerpc/platforms/cell')
0 files changed, 0 insertions, 0 deletions