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

Miquel Raynal miquel.raynal at bootlin.com
Wed Sep 4 07:25:15 PDT 2024


Hi Pratyush,

pratyush at kernel.org wrote on Wed, 04 Sep 2024 16:08:15 +0200:

> On Mon, Aug 26 2024, 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>  
> 
> Did a quick scan. Can't see anything (obvious) else being leaked on
> error paths.

Great! Thanks a lot for the reviews!

> Reviewed-by: Pratyush Yadav <pratyush at kernel.org>

Cheers,
Miquèl



More information about the linux-mtd mailing list