Skip to content

Commit fb8c381

Browse files
ambarusmiquelraynal
authored andcommitted
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
1 parent 6e88127 commit fb8c381

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/mtd/nand/raw/nand_base.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5698,10 +5698,8 @@ static int nand_scan_tail(struct nand_chip *chip)
56985698

56995699
case NAND_ECC_ENGINE_TYPE_SOFT:
57005700
ret = nand_set_ecc_soft_ops(chip);
5701-
if (ret) {
5702-
ret = -EINVAL;
5701+
if (ret)
57035702
goto err_nand_manuf_cleanup;
5704-
}
57055703
break;
57065704

57075705
case NAND_ECC_ENGINE_TYPE_ON_DIE:

0 commit comments

Comments
 (0)