mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mtd: spinand: Fix the error/cleanup path in spinand_init()
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: 7529df4652 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Acked-by: Miquel Raynal <[email protected]>
This commit is contained in:
parent
13c15e07ee
commit
c3c7dbf488
1 changed files with 2 additions and 2 deletions
|
|
@ -1016,11 +1016,11 @@ static int spinand_init(struct spinand_device *spinand)
|
|||
for (i = 0; i < nand->memorg.ntargets; i++) {
|
||||
ret = spinand_select_target(spinand, i);
|
||||
if (ret)
|
||||
goto err_free_bufs;
|
||||
goto err_manuf_cleanup;
|
||||
|
||||
ret = spinand_lock_block(spinand, BL_ALL_UNLOCKED);
|
||||
if (ret)
|
||||
goto err_free_bufs;
|
||||
goto err_manuf_cleanup;
|
||||
}
|
||||
|
||||
ret = nanddev_init(nand, &spinand_ops, THIS_MODULE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue