Commit 61202d35 authored by Erick Karanja's avatar Erick Karanja Committed by Greg Kroah-Hartman
Browse files

mtd: rawnand: atmel: Fix error handling path in atmel_nand_controller_add_nands



[ Upstream commit 8ed4728e ]

In case of a jump to the  err label due to atmel_nand_create() or
atmel_nand_controller_add_nand() failure, the reference to nand_np
need to be released

Use for_each_child_of_node_scoped() to fix the issue.

Fixes: f88fc122 ("mtd: nand: Cleanup/rework the atmel_nand driver")

Signed-off-by: default avatarErick Karanja <karanja99erick@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent df001482
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment