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>
Mon, 22 Jun 2020 07:31:26 +0000 (09:31 +0200)
commitab702f81e97856fd5e1d6a5370383f84ed0110af
tree110d8a6a83a426f46ebe8867b2bf5f695b8b4d5c
parent2d77d5575e09c980804487c731e65407a3f7e5cc
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/raw/sunxi_nand.c