diff mbox series

[3/3] mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_ops()

Message ID 20200917075213.532161-4-tudor.ambarus@microchip.com
State Accepted
Headers show
Series mtd: rawnand: Fix HW ECC handling | expand

Commit Message

Tudor Ambarus Sept. 17, 2020, 7:52 a.m. UTC
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>
---
 drivers/mtd/nand/raw/nand_base.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Miquel Raynal Sept. 28, 2020, 3 p.m. UTC | #1
On Thu, 2020-09-17 at 07:52:13 UTC, Tudor Ambarus wrote:
> 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>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel
diff mbox series

Patch

diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index d3e0ca66382f..78feed59c8b5 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: