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

Pratyush Yadav pratyush at kernel.org
Wed Sep 4 07:08:15 PDT 2024


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.

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

-- 
Regards,
Pratyush Yadav



More information about the linux-mtd mailing list