Re: [PATCH] net: dsa: mv88e6xxx: chip: Add of_node_put() before return

2019-07-23 Thread David Miller
From: Nishka Dasgupta Date: Tue, 23 Jul 2019 16:13:07 +0530 > Each iteration of for_each_available_child_of_node puts the previous > node, but in the case of a return from the middle of the loop, there is > no put, thus causing a memory leak. Hence add an of_node_put before the > return. > Issue

[PATCH] net: dsa: mv88e6xxx: chip: Add of_node_put() before return

2019-07-23 Thread Nishka Dasgupta
Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a return from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the return. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta --- drivers/net