Commit 2073ae3
committed
mtd: rawnand: mtk: Fix init error path
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: 1d6b1e4 ("mtd: mediatek: driver for MTK Smart Device")
Signed-off-by: Miquel Raynal <[email protected]>
Reviewed-by: Pratyush Yadav <[email protected]>
Reviewed-by: Matthias Brugger <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]1 parent 81cb3be commit 2073ae3
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | | - | |
| 1456 | + | |
| 1457 | + | |
1457 | 1458 | | |
| 1459 | + | |
1458 | 1460 | | |
1459 | 1461 | | |
1460 | 1462 | | |
| |||
0 commit comments