mtd: rawnand: marvell: Use nand_cleanup() when the device is not yet registered
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 24 Apr 2020 16:44:58 +0000 (18:44 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 11 May 2020 07:51:39 +0000 (09:51 +0200)
commit7a0c18fb5c71c6ac7d4662a145e4227dcd4a36a3
treeb8960c8672ff393ccaab6577deac494df1cbec06
parent5dcc99763c985d2fa9f3f176b913a336feafa7f9
mtd: rawnand: marvell: Use nand_cleanup() when the device is not yet registered

Do not call nand_release() while the MTD device has not been
registered, use nand_cleanup() instead.

Fixes: 02f26ecf8c77 ("mtd: nand: add reworked Marvell NAND controller driver")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/linux-mtd/20200424164501.26719-4-miquel.raynal@bootlin.com
drivers/mtd/nand/raw/marvell_nand.c