mtd: rawnand: sunxi: Fix the probe error path
authorMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 19 May 2020 13:00:26 +0000 (15:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Oct 2020 08:31:22 +0000 (10:31 +0200)
commit2485d0f373afe3124b2a4b6383d53afe431ce795
tree25356eaa8306860555f0c01328aa05065a686be0
parentb55f7362bd9d0104211af14c30803ebd1b231f07
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>
drivers/mtd/nand/raw/sunxi_nand.c