Skip to content

Commit

Permalink
mtd: rawnand: Don't overwrite the error code from nand_set_ecc_soft_o…
Browse files Browse the repository at this point in the history
…ps()

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
  • Loading branch information
Tudor Ambarus authored and Miquel Raynal committed Sep 30, 2020
1 parent 6e88127 commit fb8c381
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/nand/raw/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fb8c381

Please sign in to comment.