diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-19 16:00:26 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-31 11:53:36 +0300 |
commit | 3d84515ffd8fb657e10fa5b1215e9f095fa7efca (patch) | |
tree | 03b963c2c754ace687e1796855bf80f942d550e4 /drivers/mtd/nand/raw/sunxi_nand.c | |
parent | 24acc3fa8b36f998b355bb7e337361f4e76160fb (diff) | |
download | linux-3d84515ffd8fb657e10fa5b1215e9f095fa7efca.tar.xz |
mtd: rawnand: sunxi: Fix the probe error path
nand_release() is supposed be called after MTD device registration.
Here, only nand_scan() happened, so use nand_cleanup() instead.
Fixes: 1fef62c1423b ("mtd: nand: add sunxi NAND flash controller support")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-54-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd/nand/raw/sunxi_nand.c')
-rw-r--r-- | drivers/mtd/nand/raw/sunxi_nand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index 26d862213cac..9f51fd20a52e 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -2004,7 +2004,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc, ret = mtd_device_register(mtd, NULL, 0); if (ret) { dev_err(dev, "failed to register mtd device: %d\n", ret); - nand_release(nand); + nand_cleanup(nand); return ret; } |