Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b127aa8b authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller
Browse files

[SPARC]: Add missing of_node_put



There should be an of_node_put when breaking out of a loop that iterates
using for_each_node_by_type.

Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 75c6d141
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -62,9 +62,11 @@ static int __cpu_find_by(int (*compare)(int, int, void *), void *compare_arg,
		int err = check_cpu_node(dp->node, &cur_inst,
					 compare, compare_arg,
					 prom_node, mid);
		if (!err)
		if (!err) {
			of_node_put(dp);
			return 0;
		}
	}

	return -ENODEV;
}