]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: rawnand: mtk: Factorize out the logic cleaning mtk chips
authorMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 26 Aug 2024 15:30:18 +0000 (17:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:07 +0000 (16:29 +0200)
commite502a0db342245cca5b089de876a44ee1c97d3e0
treee5c2373f00f43deb3d6e8e180fa2c537ab721045
parentca63b1cbcd9920a1106003d981115448fb04bbc1
mtd: rawnand: mtk: Factorize out the logic cleaning mtk chips

[ Upstream commit 81cb3be3261e766a1f8efab9e3154a4f4fd9d03d ]

There are some un-freed resources in one of the error path which would
benefit from a helper going through all the registered mtk chips one by
one and perform all the necessary cleanup. This is precisely what the
remove path does, so let's extract the logic in a helper.

There is no functional change.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Reviewed-by: Matthias Brugger <matthias.bgg@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20240826153019.67106-1-miquel.raynal@bootlin.com
Stable-dep-of: 2073ae37d550 ("mtd: rawnand: mtk: Fix init error path")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/nand/raw/mtk_nand.c