[PATCH next 2/2] mtd: rawnand: mtk: Fix init error path

Miquel Raynal miquel.raynal at bootlin.com
Fri Sep 6 08:02:28 PDT 2024


On Mon, 2024-08-26 at 15:30:19 UTC, Miquel Raynal wrote:
> Reviewing a series converting the for_each_chil_of_node() loops into
> their _scoped variants made me realize there was no cleanup of the
> already registered NAND devices upon error which may leak memory on
> systems with more than a chip when this error occurs. We should call the
> _nand_chips_cleanup() function when this happens.
> 
> Fixes: Fixes: 1d6b1e464950 ("mtd: mediatek: driver for MTK Smart Device")
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> Reviewed-by: Pratyush Yadav <pratyush at kernel.org>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.

Miquel



More information about the linux-mtd mailing list