diff options
author | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-09-17 10:52:13 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-09-30 16:44:17 +0200 |
commit | fb8c3810d7c8d2bca01292395e35b85419394f52 (patch) | |
tree | 02ff40658abefe97a50dd2f8fe43c60e1a9454ce /drivers/mtd | |
parent | 6e88127904b837a0ade47eb2994feaa2b5fae437 (diff) |
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
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/nand_base.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index c7f4ba975e2c..1f0d542d5923 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -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: |