From: Nishka Dasgupta <nishkadg.linux@xxxxxxxxx> Date: Tue, 16 Jul 2019 11:18:43 +0530 > Each iteration of for_each_available_child_of_node puts the previous > node, but in the case of a return or break from the middle of the loop, > there is no put, thus causing a memory leak. What an incredible terribly designed loop macro, this for_each_available_child_of_node () thing is. A macro with non-trivial, invisible, side effects. It requires special handling of reference counting of objects if the loop is terminated early. This is so error prone. Is it any wonder we have to go through the entire tree fixing up nearly every use of this thing? Instead of looking at the automated analysis of this and saying "great here are all of these places where I can fix bugs", I would instead appreicate it if the reaction was more like "this interface is obviously impossible to use in a non-error-prone fashion, we should fix it." I guess I have no choice but to apply your fixes, but the larger issue must be addressed instead.