]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/irq-mbigen: Add of_node_put() before return
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Tue, 23 Jul 2019 10:39:10 +0000 (16:09 +0530)
committerMarc Zyngier <maz@kernel.org>
Fri, 26 Jul 2019 13:27:22 +0000 (14:27 +0100)
commita24a79edf32042bff948db73f13e1567c4be1c55
tree06f3adc62b87f1b7e29fcfe2fd1a5fb56a6c4d6a
parentaf0653291614c9719a75e0cc5d3ee2f101f69a39
irqchip/irq-mbigen: Add of_node_put() before return

Each iteration of for_each_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. Add an of_node_put before the return in
three places.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
drivers/irqchip/irq-mbigen.c