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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:14 +0000 (09:34 +0200)
commitb0baea9944cae21189f61c1532d781c1579715a1
tree05a9ecca43040a9194c2f25d6db4c0f8cd9eeee2
parent8a2a49b9d4846128f24b9661a8bdd818061742a7
mtd: rawnand: marvell: Use nand_cleanup() when the device is not yet registered

commit 7a0c18fb5c71c6ac7d4662a145e4227dcd4a36a3 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/marvell_nand.c