summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/marvell_nand.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-04-24 18:44:58 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-05-11 09:51:39 +0200
commit7a0c18fb5c71c6ac7d4662a145e4227dcd4a36a3 (patch)
treeb8960c8672ff393ccaab6577deac494df1cbec06 /drivers/mtd/nand/raw/marvell_nand.c
parent5dcc99763c985d2fa9f3f176b913a336feafa7f9 (diff)
downloadlinux-7a0c18fb5c71c6ac7d4662a145e4227dcd4a36a3.tar.bz2
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
Diffstat (limited to 'drivers/mtd/nand/raw/marvell_nand.c')
-rw-r--r--drivers/mtd/nand/raw/marvell_nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index b7f0bf5e8894..893f86c2f57c 100644
--- a/drivers/mtd/nand/raw/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
@@ -2665,7 +2665,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
ret = mtd_device_register(mtd, NULL, 0);
if (ret) {
dev_err(dev, "failed to register mtd device: %d\n", ret);
- nand_release(chip);
+ nand_cleanup(chip);
return ret;
}