mtd: rawnand: lpc32xx_mlc: fix the probe function error path
authorMiquel Raynal <miquel.raynal@bootlin.com>
Sat, 21 Apr 2018 18:00:41 +0000 (20:00 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Sun, 29 Apr 2018 06:56:45 +0000 (08:56 +0200)
commit838c07b05b369b3ee6bb18cdc1aec1241a1ef951
treecba1d2785224fb0ae4086707ad828cedbd66dc36
parented64cb1df48152743a927a1187413de35b940441
mtd: rawnand: lpc32xx_mlc: fix the probe function error path

An error after nand_scan_tail() should trigger a nand_cleanup() and not
a nand_release(). The latter doing an mtd_device_unregister() which is
not needed if mtd_device_register() failed.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/lpc32xx_mlc.c