[PATCH] mtd: rawnand: meson: Add of_node_put() before return
miquel.raynal at bootlin.com
Thu Jul 25 00:55:23 PDT 2019
On Tue, 2019-07-09 at 17:16:40 UTC, Nishka Dasgupta wrote:
> 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. Hence add an of_node_put before the return.
> Issue found with Coccinelle.
> Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>
> Acked-by: Liang Yang <liang.yang at amlogic.com>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.
More information about the linux-amlogic