mtd: rawnand: brcmnand: fix probe function error path
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 21 Mar 2018 13:01:42 +0000 (14:01 +0100)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Thu, 29 Mar 2018 07:38:18 +0000 (09:38 +0200)
commit5826b8802a970d2b0aaf097951de42040ee32480
tree1e72dca6c76548a953d1c253e92d5e4b031835cf
parent15d6f118285f2ffc73fc8de75ecf7c36c3c6fe18
mtd: rawnand: brcmnand: fix probe function error path

An error after nand_scan_tail() should trigger a nand_cleanup().
The helper mtd_device_register() returns an error code that should
be checked and nand_cleanup() called accordingly.

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