mtd: spinand: Fix the error/cleanup path in spinand_init()
authorBoris Brezillon <bbrezillon@kernel.org>
Thu, 24 Jan 2019 14:46:54 +0000 (15:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Feb 2019 07:10:10 +0000 (08:10 +0100)
commita72040a9d929c17dcfb874671b21e4410df4c8c0
tree3fea06ff6841095d4ca9ae3fcf758ba10fac9525
parentb3ce77578374ae79e6cb5eea340c4d1607ecb84d
mtd: spinand: Fix the error/cleanup path in spinand_init()

commit c3c7dbf4887ab3ed9d611cd1f6e16937f8700743 upstream.

The manufacturer specific initialization has already been done when
block unlocking takes place, and if anything goes wrong during this
procedure we should call spinand_manufacturer_cleanup().

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/spi/core.c