aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2019-01-13 09:47:44 +0100
committerMaxime Ripard <[email protected]>2019-01-15 21:46:10 +0100
commit4bb0e6d7258213d4893c2c876712fbba40e712fe (patch)
tree699b27b4ad9837f2df31dbd7cef644ca1cb4a45a /lib/mpi
parentce0210c12433031aba3bbacd75f4c02ab77f2004 (diff)
drm/sun4i: backend: add missing of_node_puts
The device node iterators perform an of_node_get on each iteration, so a jump out of the loop requires an of_node_put. Remote and port also have augmented reference counts, so drop them on each iteration and at the end of the function, respectively. Remote is only used for the address it contains, not for the contents of that address, so the reference count can be dropped immediately. The semantic patch that fixes the first part of this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; iterator name for_each_child_of_node; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child + of_node_put(child); ? break; ... } ... when != child // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'lib/mpi')
0 files changed, 0 insertions, 0 deletions