diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-05-19 15:00:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-14 10:31:22 +0200 |
commit | 2485d0f373afe3124b2a4b6383d53afe431ce795 (patch) | |
tree | 25356eaa8306860555f0c01328aa05065a686be0 | |
parent | b55f7362bd9d0104211af14c30803ebd1b231f07 (diff) | |
download | linux-stable-2485d0f373afe3124b2a4b6383d53afe431ce795.tar.gz linux-stable-2485d0f373afe3124b2a4b6383d53afe431ce795.tar.bz2 linux-stable-2485d0f373afe3124b2a4b6383d53afe431ce795.zip |
mtd: rawnand: sunxi: Fix the probe error path
commit 3d84515ffd8fb657e10fa5b1215e9f095fa7efca upstream.
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
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 5b8502fd50cb..88075e420f90 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1947,7 +1947,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; } |