Commit d2419790 authored by Brian Norris's avatar Brian Norris Committed by Boris Brezillon

mtd: nand: samsung: warn about un-parseable ECC info

We don't handle cases larger than 7. We probably shouldn't pretend we
know the ECC step size in this case, and it's probably also good to
WARN() like we do in many other similar cases.

Fixes: 8fc82d45 ("mtd: nand: samsung: Retrieve ECC requirements from extended ID")
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
parent 78771049
...@@ -84,6 +84,9 @@ static void samsung_nand_decode_id(struct nand_chip *chip) ...@@ -84,6 +84,9 @@ static void samsung_nand_decode_id(struct nand_chip *chip)
case 7: case 7:
chip->ecc_strength_ds = 60; chip->ecc_strength_ds = 60;
break; break;
default:
WARN(1, "Could not decode ECC info");
chip->ecc_step_ds = 0;
} }
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment