mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_ops()

The error code received from nand_set_ecc_soft_ops() was overwritten,
drop this redundant assignment and use the error code received from
the callee.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200917075213.532161-4-tudor.ambarus@microchip.com
This commit is contained in:
Tudor Ambarus 2020-09-17 10:52:13 +03:00 committed by Miquel Raynal
parent 6e88127904
commit fb8c3810d7

View file

@ -5698,10 +5698,8 @@ static int nand_scan_tail(struct nand_chip *chip)
case NAND_ECC_ENGINE_TYPE_SOFT:
ret = nand_set_ecc_soft_ops(chip);
if (ret) {
ret = -EINVAL;
if (ret)
goto err_nand_manuf_cleanup;
}
break;
case NAND_ECC_ENGINE_TYPE_ON_DIE: