Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-08-01 Thread Michal Simek
On 02. 08. 19 6:59, Nishka Dasgupta wrote: > On 31/07/19 7:51 PM, Michal Simek wrote: >> On 31. 07. 19 15:06, Nishka Dasgupta wrote: >>> On 31/07/19 2:01 PM, Michal Simek wrote: On 09. 07. 19 19:28, Nishka Dasgupta wrote: > Each iteration of for_each_available_child_of_node puts the previo

Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-08-01 Thread Nishka Dasgupta
On 31/07/19 7:51 PM, Michal Simek wrote: On 31. 07. 19 15:06, Nishka Dasgupta wrote: On 31/07/19 2:01 PM, Michal Simek wrote: On 09. 07. 19 19:28, Nishka Dasgupta wrote: Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a goto from the middle of the

Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-07-31 Thread Michal Simek
On 31. 07. 19 15:06, Nishka Dasgupta wrote: > On 31/07/19 2:01 PM, Michal Simek wrote: >> On 09. 07. 19 19:28, Nishka Dasgupta wrote: >>> Each iteration of for_each_available_child_of_node puts the previous >>> node, but in the case of a goto from the middle of the loop, there is >>> no put, thus c

Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-07-31 Thread Nishka Dasgupta
On 31/07/19 2:01 PM, Michal Simek wrote: On 09. 07. 19 19:28, Nishka Dasgupta wrote: Each iteration of for_each_available_child_of_node puts the previous node, but in the case of a goto from the middle of the loop, there is no put, thus causing a memory leak. Hence add an of_node_put before the

Re: [PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

2019-07-31 Thread Michal Simek
On 09. 07. 19 19:28, Nishka Dasgupta wrote: > Each iteration of for_each_available_child_of_node puts the previous > node, but in the case of a goto from the middle of the loop, there is > no put, thus causing a memory leak. Hence add an of_node_put before the > goto. > Issue found with Coccinelle.

[PATCH] mailbox: zynqmp-ipi-mailbox: Add of_node_put() before goto

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