Re: [PATCH] net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus()

2019-08-06 Thread David Miller
From: Nishka Dasgupta Date: Sun, 4 Aug 2019 21:00:18 +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. > Ad

[PATCH] net: dsa: qca8k: Add of_node_put() in qca8k_setup_mdio_bus()

2019-08-04 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. Additionally, the local variable ports in the function qca8k_setup_mdio_b